Fix service settings init ordering and example bugs
- Speechmatics: move config build after super().__init__ and settings delta so turn_detection_mode (e.g. ADAPTIVE) takes effect - Google STT: fix example passing bare Language enum instead of list - Google TTS: add missing explicit defaults for all custom settings fields - Soniox: fix accidental tuple wrapping of STT service in example - Speechmatics examples: fix system->user role in kick-off messages - Deepgram Flux: move tag from settings to __init__ (billing metadata) - ElevenLabs STT: default tag_audio_events to None (use API default) - Fal STT: simplify language default handling - Google TTS: rename GoogleStreamTTSSettings to GoogleTTSSettings
This commit is contained in:
@@ -55,8 +55,9 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
|
||||
stt = GoogleSTTService(
|
||||
settings=GoogleSTTSettings(
|
||||
languages=Language.EN_US,
|
||||
model="chirp_3",
|
||||
languages=[Language.EN_US],
|
||||
# Add model to use a specific model
|
||||
# model="chirp_3",
|
||||
),
|
||||
credentials=os.getenv("GOOGLE_TEST_CREDENTIALS"),
|
||||
location="us",
|
||||
|
||||
@@ -51,13 +51,13 @@ transport_params = {
|
||||
async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
logger.info(f"Starting bot")
|
||||
|
||||
stt = (
|
||||
SonioxSTTService(
|
||||
api_key=os.getenv("SONIOX_API_KEY"),
|
||||
settings=SonioxSTTSettings(
|
||||
language_hints=[Language.EN],
|
||||
language_hints_strict=True,
|
||||
),
|
||||
stt = SonioxSTTService(
|
||||
api_key=os.getenv("SONIOX_API_KEY"),
|
||||
settings=SonioxSTTSettings(
|
||||
# Add language hints to use a specific language
|
||||
# Add strict mode to enforce the language hints
|
||||
language_hints=[Language.EN],
|
||||
language_hints_strict=True,
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user