1

My program uses the Go bindings of the Vosk speech recognition library, which takes in the audio as byte slices of WAV mono audio. My program currently uses the external command arecord to get WAV audio from the microphone but I'd prefer to do it in Go proper, and preferably without any shared library dependencies.

I tried using the malgo package but got stuck on how to convert the raw audio from the microphone to WAV. The WAV encoding packages I've found only write to files (io.WriteSeeker) but I need to convert a continuous stream from the microphone for realtime speech recognition.

Linux at least

GGG
  • 295
  • 1
  • 9

0 Answers0