A real-time speech-to-text (STT) transcription project written in Go, leveraging Deepgram API for accurate, low-latency audio transcription.
Perfect for audio streaming, voice notes, or voice-controlled applications.
- 🎧 Real-time audio streaming from microphone
- 📝 Live transcription using Deepgram API
- 🌐 Supports multiple languages (
en,es,fr, etc.) - ✅ Graceful shutdown on Ctrl+C
- ⚡ Uses PortAudio for cross-platform audio capture
- 📦 Easy to configure via .env
# Run with default English language
go run main.go --lang=en
# Run with Spanish
go run main.go --lang=es
-
Prerequisites
-
Go 1.20+
-
PortAudio (install via brew, apt, or other package manager)
-
Deepgram API Key
# MacOS
brew install portaudio
# Ubuntu
sudo apt-get install portaudio19-dev
git clone https://github.com/Kesha005/audio-stt.git
cd audio-stt
go mod tidy
cp .env-example .env
# Set DEEPGRAM_KEY in .env
go run main.go --lang=en
go run main.go --lang=es
Use languages which support deepgram stt. Deepgram stt https://developers.deepgram.com/docs/models-languages-overview.
2025/11/21 15:28:24 Opened
2025/11/21 15:28:29 Received transcription: Salome. How are you?
2025/11/21 15:28:39 Received transcription: Hi. How are you?
Deepgram for the STT API
PortAudio for cross-platform audio streaming
Go community for amazing tools and libraries