- 安装sounddevice
pip install sounddevice
- 安装portAudio
sudo apt-get install libportaudio2
sudo apt-get install libasound-dev
sudo apt-get install portaudio.dev
sudo apt-get install python3-pyaudio
pip install pyaudio
- 安装wave
pip install wave
- 安装nls
https://help.aliyun.com/zh/isi/developer-reference/stream-input-tts-sdk-quick-start
- 跑代码
# -*- coding: utf-8 -*-
#!/usr/bin/env python3
# Real-time keyword spotting from a microphone with sherpa-onnx Python API
#
# Please refer to
# https://k2-fsa.github.io/sherpa/onnx/kws/pretrained_models/index.htm