-
|
I deploy the service using Docker and test the sample client on my local machine. The problem now is that I test the HTML page, record with my microphone, and it works correctly. Then I test the Python client using a WAV file, and the result is also correct. No output, despite occupying the microphone. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Two details in that command explain the missing output:
With the current client, install PyAudio and websockets, grant the Python process microphone permission, and omit --audio_in: python -m pip install pyaudio websockets
python runtime/python/websocket/funasr_wss_client.py --host 127.0.0.1 --port 10095 --mode 2pass --ssl 0Use --ssl 0 only when the deployed server uses plain ws://. If the server is configured for wss://, keep the default --ssl 1. The microphone path captures 16 kHz, mono, signed 16-bit PCM and prints online partial text plus the corrected 2pass result at each detected sentence end. No --audio_in argument is the switch that selects this path. If you specifically need offline recognition, first finish the recording and send it as a finite file: python runtime/python/websocket/funasr_wss_client.py --host 127.0.0.1 --port 10095 --mode offline --audio_in recording.wav --ssl 0A custom live client can also obtain an offline final result by stopping capture, sending {"is_speaking": false}, and continuing to receive until is_final=true. Current source and documentation: |
Beta Was this translation helpful? Give feedback.
Two details in that command explain the missing output:
With the current client, install PyAudio and websockets, grant the Python process microphone permission, and omit --audio_in: