업무 자동화 음성 텍스트로 변환하기 with n8n & STT 음성 파일을 자동으로 텍스트로 변환하는 STT(Speech-to-Text) 기능은 다양한 업무 자동화에 활용될 수 있습니다. 특히 n8n과 Google Drive를 연동하면, 파일 업로드 시 자동으로 음성을 텍스트로 변환하는 강력한 자동화 시스템을 구성할 수 있습니다. 본문에서는 STT 구현 방법과 함께, 이를 n8n으로 자동화하는 실제 워크플로우 구성 방법까지 안내드립니다.
STT는 음성을 인식하여 텍스트로 변환하는 기술로, 음성 회의 기록, 고객 서비스 녹취 분석, 뉴스 스크립트 자동화 등 다양한 영역에서 활용됩니다. TTS(Text-to-Speech)의 반대 개념이며, AI 음성 인식 기술의 핵심 요소입니다.
Google의 STT API는 고정밀 음성 인식 서비스를 제공합니다.
import os
from google.cloud import speech
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "your_key.json"
def transcribe(audio_file):
client = speech.SpeechClient()
with open(audio_file, "rb") as f:
content = f.read()
audio = speech.RecognitionAudio(content=content)
config = speech.RecognitionConfig(
encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=16000,
language_code="ko-KR"
)
response = client.recognize(config=config, audio=audio)
for result in response.results:
print(result.alternatives[0].transcript)
Python 기반 오픈소스 라이브러리로, Google Web Speech API 등을 사용할 수 있습니다.
pip install SpeechRecognition pydubfrom pydub import AudioSegment
import speech_recognition as sr
def convert_audio(input_file, output_file):
AudioSegment.from_file(input_file).export(output_file, format="wav")
def recognize_speech(audio_file):
r = sr.Recognizer()
with sr.AudioFile(audio_file) as source:
audio = r.record(source)
print(r.recognize_google(audio, language="ko-KR"))
Whisper는 다양한 언어를 지원하는 고성능 STT 모델로, 오픈소스로 제공됩니다.
pip install git+https://github.com/openai/whisper.gitimport whisper
model = whisper.load_model("base")
result = model.transcribe("sample_audio.mp3")
print(result["text"])
Google Drive에 음성 파일이 업로드되면, 자동으로 이를 감지하고 STT 변환 후 텍스트 결과를 저장하는 n8n 워크플로우 구성 방법입니다.
n8n을 아직 설치안하셨다면 해당 내용을 먼저 참고해보세요!
2024.12.15 – [제품추천/소프트웨어] – n8n 시놀로지 로컬 설치 쉽게 하는 방법
n8n 시놀로지 로컬 설치 쉽게 하는 방법
n8n 시놀로지 로컬 설치 쉽게 하는 방법 ㅣ n8n(n-eight-n으로 발음)은 전 세계의 모든 API 앱을 서로 연결하여 코드 한 줄 없이 데이터를 공유하고 조작할 수 있도록 도와줍니다. 사용하기 쉽고 사용
aboda.kr
Python 코드를 n8n의 Execute Command 노드로 실행합니다. 아래 예시는 Google Cloud API를 활용한 변환 스크립트입니다.
import os
import requests
from google.cloud import speech
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "your_key.json"
def download_file(url, local_path):
with requests.get(url, stream=True) as r:
r.raise_for_status()
with open(local_path, 'wb') as f:
for chunk in r.iter_content(8192):
f.write(chunk)
def transcribe(audio_file):
client = speech.SpeechClient()
with open(audio_file, "rb") as f:
content = f.read()
audio = speech.RecognitionAudio(content=content)
config = speech.RecognitionConfig(
encoding=speech.RecognitionConfig.AudioEncoding.LINEAR16,
sample_rate_hertz=16000,
language_code="ko-KR"
)
response = client.recognize(config=config, audio=audio)
return "\n".join([r.alternatives[0].transcript for r in response.results])
url = "URL_FROM_N8N"
file_path = "audio.wav"
download_file(url, file_path)
print(transcribe(file_path))
n8n과 STT 기능을 결합하면 음성 기반 데이터를 자동으로 분석하고 저장하는 자동화 시스템을 간단하게 구축할 수 있습니다. 코드 지식이 많지 않더라도, 위 워크플로우를 따라 하시면 누구나 구현할 수 있습니다.
관련 글
n8n자동화, 음성텍스트변환, STT자동화, 구글STTAPI, openaiWhisper, 음성인식워크플로우, GoogleDrive트리거, 자동음성기록, n8nExecuteCommand, STT스크립트
2025.06.20 – [부동산/자동화 프로젝트] – n8n Slack으로 자동 메시지 보내기 완전 쉬워요 (1/1)
n8n Slack으로 자동 메시지 보내기 완전 쉬워요 (1/1)
n8n Slack으로 자동 메시지 보내기 완전 쉬워요 , n8n을 활용한 자동화 워크플로우 시간입니다. 이번에는 Slack 채널로 알림 메시지를 자동 전송하는 방법을 소개드립니다. 환율 정보, 에러 발생 알림
aboda.kr
"Blow off"는 여러 가지 의미로 사용될 수 있는 표현으로, 주로 "무시하다", "가볍게 넘기다", 또는 "취소하다"는…
A big commitment 큰 책임 중대한 약속 영어로 "A big commitment"는 "큰 책임" 또는 "중대한…
영어 구동사 Bring 계열 한 번에 정리! (Out·In·Up·Down 차이) 영어에서 bring은 ‘운반하다’ 이상의 의미를 담고…
아이폰 유저 필수! iOS 26 번역 기능 설정과 Siri·ChatGPT 활용법 iOS 26 업데이트 이후 Apple…
Get on with your life 지난날 잊고 살아 영어로 "Get on with your life"는 "네…
애플워치 사진 동기화 해제 방법 4단계 (초보자용 가이드) 최근 업데이트 이후 애플워치를 켜면 갑자기 아이폰…