Skip to content

Commit

Permalink
Kitt to handle empty deepgram text + elevenlabs bug fix (#155)
Browse files Browse the repository at this point in the history
hotfix
  • Loading branch information
keepingitneil authored Feb 7, 2024
1 parent 7661824 commit 5fab872
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions examples/kitt/kitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ async def _run(self, max_retry: int) -> None:
started = False
while not ws.closed:
text = None
if retry_text_queue.empty():
if not retry_text_queue.empty():
text = await retry_text_queue.get()
retry_text_queue.task_done()
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "0.1.4"
__version__ = "0.1.5"

0 comments on commit 5fab872

Please sign in to comment.