Nvidia RIVA streaming audio Error

Hardware - GPU : NVIDIA RTX A4000
Hardware - CPU : 13th Gen Intel(R) Core™ i7-13700
Operating System : LINUX
Riva Version : 2.18.0

I have Downloaded and setup following the instruction in Quick-Start Guide for Data center.
I am getting an error:

root@nv-wrk04:/opt/riva/examples# nano transcribe_mic.py
root@nv-wrk04:/opt/riva/examples# python transcribe_mic.py
bash: python: command not found
root@nv-wrk04:/opt/riva/examples# python3 transcribe_mic.py
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
SystemError: PY_SSIZE_T_CLEAN macro must be defined for ‘#’ formats
Traceback (most recent call last):
File “/opt/riva/examples/transcribe_mic.py”, line 89, in
main()
File “/opt/riva/examples/transcribe_mic.py”, line 79, in main
riva.client.print_streaming(
File “/usr/local/lib/python3.10/dist-packages/riva/client/asr.py”, line 246, in print_streaming
for response in responses:
File “/usr/local/lib/python3.10/dist-packages/riva/client/asr.py”, line 393, in streaming_response_generator
for response in self.stub.StreamingRecognize(generator, metadata=self.auth.get_auth_metadata()):
File “/usr/local/lib/python3.10/dist-packages/grpc/_channel.py”, line 543, in next
return self._next()
File “/usr/local/lib/python3.10/dist-packages/grpc/_channel.py”, line 960, in _next
_common.wait(self._state.condition.wait, _response_ready)
File “/usr/local/lib/python3.10/dist-packages/grpc/_common.py”, line 156, in wait
_wait_once(wait_fn, MAXIMUM_WAIT_TIMEOUT, spin_cb)
File “/usr/local/lib/python3.10/dist-packages/grpc/_common.py”, line 116, in _wait_once
wait_fn(timeout=timeout)
File “/usr/lib/python3.10/threading.py”, line 324, in wait
gotit = waiter.acquire(True, timeout)
SystemError
root@nv-wrk04:/opt/riva/examples#

The Docker log :docker-logs.txt (67.1 KB)

How can i solve this error.

I resolved this issue by using a standard Ubuntu-based Docker container and manually installing the required libraries. Below are the exact steps I followed:

  1. Run the Docker Container

Use the following command to start a Docker container with proper audio support:

docker run -it --rm \
    --device /dev/snd \
    --group-add audio \
    --env PULSE_SERVER=unix:${XDG_RUNTIME_DIR}/pulse/native \
    --volume ${XDG_RUNTIME_DIR}/pulse/native:${XDG_RUNTIME_DIR}/pulse/native \
    --env PULSE_COOKIE=/run/pulse/cookie \
    --volume /run/pulse/cookie:/run/pulse/cookie \
    --env DISPLAY \
    --volume /tmp/.X11-unix:/tmp/.X11-unix \
    ubuntu:22.04 bash

2. Install Required Libraries

Once inside the container, update the package list and install alsa-utils:

apt update && apt install -y alsa-utils

3. Configure the Correct Audio Device

Make sure to set the correct device index in the transcribe_mic.py script before running it.

After these steps, the setup worked perfectly for me. I hope this helps anyone facing similar issues!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.