Skip to content

Frida7771/GoSpeech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoSpeech

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.


Features

  • 🎙 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

Prerequisites

  • Go 1.20+
  • macOS (Apple Silicon tested)
  • ONNX Runtime (installed via Homebrew)
brew install onnxruntime

Installation

1. Clone the repository

git clone https://github.com/Frida7771/GoSpeech
cd go-speech

2. Download model files

Model 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_models

3. Build the CLI tool

cd cmd/go-speech
go build -o go-speech

How to Run

After 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.wav

License

MIT License - see LICENSE file for details.


Acknowledgments

This project is based on the open-source project getcharzp/go-speech, with significant refactoring and CLI restructuring.


About

speech processing tool using Go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages