Skip to content

Commit

Permalink
Fix transcriber example (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzhao authored Nov 17, 2024
1 parent 6f330b2 commit e4ba818
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 1 addition & 3 deletions examples/speech-to-text/transcriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ async def _forward_transcription(
async def entrypoint(ctx: JobContext):
logger.info(f"starting transcriber (speech to text) example, room: {ctx.room.name}")
# this example uses OpenAI Whisper, but you can use assemblyai, deepgram, google, azure, etc.
stt_impl = openai.STT(
energy_filter=True,
)
stt_impl = openai.STT()

if not stt_impl.capabilities.streaming:
# wrap with a stream adapter to use streaming semantics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class STTOptions:
keywords: list[Tuple[str, float]]
profanity_filter: bool
energy_filter: AudioEnergyFilter | bool = False
# whether energy filter is used before sending to deepgram, or just for metrics events
use_energy_filter: bool = False


class STT(stt.STT):
Expand Down

0 comments on commit e4ba818

Please sign in to comment.