Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle empty string from deepgram
Browse files Browse the repository at this point in the history
keepingitneil committed Feb 7, 2024

Verified

This commit was signed with the committer’s verified signature.
scottopell Scott Opell
1 parent 7661824 commit e11d928
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/kitt/kitt.py
Original file line number Diff line number Diff line change
@@ -130,6 +130,8 @@ async def process_track(self, track: rtc.Track):
async def process_stt_stream(self, stream):
buffered_text = ""
async for event in stream:
if event.alternatives[0].text == "":
continue
if event.is_final:
buffered_text = " ".join([buffered_text, event.alternatives[0].text])

0 comments on commit e11d928

Please sign in to comment.