Skip to content

Commit f7d5e3e

Browse files
authored
Getting VAD states from the riva-server (#102)
Logging VAD states
1 parent e35192a commit f7d5e3e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

common

riva/client/asr.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,12 @@ def print_streaming(
248248
continue
249249
partial_transcript = ""
250250
for result in response.results:
251+
if result.pipeline_states and len(result.pipeline_states.vad_probabilities) > 0:
252+
vad_prob_logs = "VAD States: "
253+
for vad_state in result.pipeline_states.vad_probabilities:
254+
vad_prob_logs += str(vad_state) + " "
255+
for i, f in enumerate(output_file):
256+
f.write(vad_prob_logs + "\n")
251257
if not result.alternatives:
252258
continue
253259
transcript = result.alternatives[0].transcript

0 commit comments

Comments
 (0)