GoSpeech is a Go-based speech processing tool that supports both speech-to-text (ASR) and text-to-speech (TTS) using ONNX Runtime.
This project refactors and extends an open-source speech project into a production-style CLI application, with macOS-native ONNX Runtime integration.
- 🎙 Speech-to-Text (ASR) using Paraformer
- Supports Chinese and English speech recognition
- 🔊 Text-to-Speech (TTS)
- Mandarin Chinese and English TTS using MeloTTS
- 🖥 CLI-first design with simple subcommands
- ⚙️ Native ONNX Runtime integration on macOS (CGO)
- 🧩 Clean and extensible project structure
- Go 1.20+
- macOS (Apple Silicon tested)
- ONNX Runtime (installed via Homebrew)
brew install onnxruntimegit clone https://github.com/Frida7771/GoSpeech
cd go-speechModel files need to be downloaded from Hugging Face (requires git-lfs):
# Install git-lfs if not already installed
brew install git-lfs
git lfs install
# Clone model repository
git clone https://huggingface.co/getcharzp/go-speech ./temp_models
# Move files to correct locations
mv ./temp_models/lib ./lib
mv ./temp_models/melo_weights ./melo_weights
mv ./temp_models/paraformer_weights ./paraformer_weights
# Clean up
rm -rf ./temp_modelscd cmd/go-speech
go build -o go-speechAfter building, run from the cmd/go-speech directory:
cd cmd/go-speech
go run cmd/go-speech/main.go tts "<text>"
go run cmd/go-speech/main.go asr assets/output.wavMIT License - see LICENSE file for details.
This project is based on the open-source project getcharzp/go-speech, with significant refactoring and CLI restructuring.