Skip to content

Commit

Permalink
Getting VAD states from the riva-server (#102)
Browse files Browse the repository at this point in the history
Logging VAD states
  • Loading branch information
sarane22 authored Nov 8, 2024
1 parent e35192a commit f7d5e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common
6 changes: 6 additions & 0 deletions riva/client/asr.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ def print_streaming(
continue
partial_transcript = ""
for result in response.results:
if result.pipeline_states and len(result.pipeline_states.vad_probabilities) > 0:
vad_prob_logs = "VAD States: "
for vad_state in result.pipeline_states.vad_probabilities:
vad_prob_logs += str(vad_state) + " "
for i, f in enumerate(output_file):
f.write(vad_prob_logs + "\n")
if not result.alternatives:
continue
transcript = result.alternatives[0].transcript
Expand Down

0 comments on commit f7d5e3e

Please sign in to comment.