NVIDIA Riva ASR - Stopping microphone recording

Please provide the following information when requesting support.

Hardware - GPU (GeForce RTX 2070)
Hardware - CPU
Operating System - Win 10
Riva Version 2.14.0
TLT Version (if relevant)

I am currently modifying the transcribe_mic.py example from NVIDIA.
By looking into the ASR arguments I’ve managed to write the output to a text file.
But i am unable to exit out of the recording state other than pressing ctrl+c.
This becomes an issue when i’m running the script from my main python script(see below). I know this might be a more general python coding request. Maybe there is even a better way to do this than the way i am(probably).

  • I’ve tried using subprocess but when i do that i suddenly am not getting any of the transcribed text in my file
  • I’ve tried using a specific key to start and stop the script but with the same result
  • I need to run the transcribe_mic.py script from it’s location or it won’t work
#microphone ASR service
os.system(r"C:\Windows\System32\riva_quickstart_v2.14.0\examples\transcribe_mic.py --input-device 10")

# List of Python scripts to run sequentially. LLM post and wav synthesizer
scripts = ['nvngc_mistral_nostream.py', 'nvgc_synthesize_output.py']

# Loop through the scripts and run them one by one
for script in scripts:
    # Run the script using subprocess
    subprocess.run(['python', script])

#Send wav synthesizer result to Audio2Face 
os.system(r"D:\Nvidia\LibraryPath\audio2face-2023.2.0\exts\omni.audio2face.player\omni\audio2face\player\scripts\streaming_server\test_client.py C:\Windows\System32\riva_quickstart_v2.14.0\output.wav /World/audio2face/PlayerStreaming 1")

I actually got this to work with ctrl+c as the escape out of mic recording.
It’s a hack but it works.

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