Skip to content

aj3423/vosk-sound-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Golang demo for how to use:

  • VOSK for speech recognition.
  • miniaudio for capturing audio input from microphone.

What it does:

  1. Capture audio input and send to a local voice recognition engine
  2. Play back the captured sound
  3. Record voice to a ".wav" file

Usage:

  1. docker run -d -p 2700:2700 alphacep/kaldi-en:latest This runs official VOSK-server docker image.
  2. ./vosk-sound-test It starts capturing and displays the words you say, also saves audio to file out.wav
  3. Press <Enter> to stop capturing and play back
  4. Press <Enter> again to exit.

Troubleshooting

  1. Low sound quality

Maybe you're using some bluetooth airbuds like "airpods". For system like Linux, the input sound frequency is limited to 8000 at bluetooth stack, 16000 is a minimal frequency for VOSK to work well. A dedicated wired/wireless microphone should work.

  1. It doesn't work at all

Open the system sound manager, verify the recording device while this program is capturing. Sometimes a wrong device is choosed by default.

Build from source

  1. Install Golang
  2. git clone https://github.com/aj3423/vosk-sound-test
  3. cd vosk-sound-test
  4. go build .

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages