remove separate transcriptions

This commit is contained in:
Ben Xu 2024-12-30 15:26:15 -05:00
parent 6110e70430
commit 4c271b19a7
1 changed files with 0 additions and 14 deletions

View File

@ -1,14 +0,0 @@
from livekit.agents import stt, transcription
async def _forward_transcription(
stt_stream: stt.SpeechStream,
stt_forwarder: transcription.STTSegmentsForwarder,
):
"""Forward the transcription to the client and log the transcript in the console"""
async for ev in stt_stream:
stt_forwarder.update(ev)
if ev.type == stt.SpeechEventType.INTERIM_TRANSCRIPT:
print(ev.alternatives[0].text, end="")
elif ev.type == stt.SpeechEventType.FINAL_TRANSCRIPT:
print("\n")
print(" -> ", ev.alternatives[0].text)