This repository has been archived on 2025-08-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
enginex_bi_series-sherpa-onnx/go-api-examples/real-time-speech-recognition-from-microphone
Fangjun Kuang 282211c01f Remove portaudio-go in Go API examples. (#2317)
Replace the deprecated portaudio-go integration with malgo in the Go real-time 
speech recognition example and correct version string typos in the Node.js examples.

- Fixed “verison” typo in Node.js console logs.
- Swapped out portaudio-go for malgo in the Go microphone example, 
   introducing initRecognizer, callback-driven streaming, and sample conversion.
- Removed portaudio-go from go.mod.
2025-06-26 11:33:50 +08:00
..
2023-07-21 17:56:09 +08:00
2024-05-21 11:50:13 +08:00

Introduction

This examples shows how to use the golang package of sherpa-onnx for real-time speech recognition from microphone.

It uses https://github.com/csukuangfj/portaudio-go to read the microphone and you have to install portaudio first.

On macOS, you can use

brew install portaudio

and it will install portaudio into /usr/local/Cellar/portaudio/19.7.0. You need to set the following environment variable

export PKG_CONFIG_PATH=/usr/local/Cellar/portaudio/19.7.0

so that pkg-config --cflags --libs portaudio-2.0 can run successfully.