I’m trying Riva.
I got Riva 2.12.0 working with Jetson Agx Orin.
I was able to use transcribe_mic.py to ASR the voice input from the microphone and see the text appear in the terminal.
But this is just a demo.
I want to process the text after ASR.
I think that the text is displayed by the following process, but how can I, for example, create a new variable and copy the text into that variable?
Could you please write the code as a sample?
Thanks for your interest in Riva
It is also possible to print streaming results in several places, e.g. in STDOUT and also on a file. you can store it in a file and load it into a variable
output_file = "my_results.txt"
Thank you for your advice!!
I tried it right away.
my_results.txt was created when I ran transcribe_mic.py.
I spoke into the microphone.
The terminal displays ## followed by the conversation as text.
I think this is displaying text by sys.stdout.
At this time, the content of my_results.txt is blank.
When I stopped the execution of transcribe_mic.py with Ctrl +C, the text was written to my_results.txt.
I want to pass the ASR result text to other applications based on transcribe_mic.py. I think I can pass it in my_results.txt like this time, but I would like to know when the ASR result text is written in my_results.txt.
Will it not be written unless transcribe_mic.py is stopped?
I was able to obtain Riva’s output results using the following method.
thank you very much.
riva.client.add_word_boosting_to_config(config, args.boosted_lm_words, args.boosted_lm_score)
) as audio_chunk_iterator:
responses = asr_service.streaming_response_generator(
for response in responses:
transcript_text = response.results.alternatives.transcript
print("Transcript data not available")