This commit is contained in:
carolin-tavus
2025-07-03 14:38:20 +00:00
parent 30a3b24287
commit cb81f3d50e

View File

@@ -143,9 +143,13 @@ class TavusApi:
logger.debug(f"Fetched Tavus persona: {response}") logger.debug(f"Fetched Tavus persona: {response}")
try: try:
transport_settings = response.get("layers", {}).get("transport", {}) transport_settings = response.get("layers", {}).get("transport", {})
microphone_enabled = transport_settings.get("input_settings", {}).get("microphone", "") microphone_enabled = transport_settings.get("input_settings", {}).get(
"microphone", ""
)
if microphone_enabled != "enabled": if microphone_enabled != "enabled":
raise Exception("Microphone is not enabled for this persona. Please update the persona or use the persona pipecat-stream.") raise Exception(
"Microphone is not enabled for this persona. Please update the persona or use the persona pipecat-stream."
)
except Exception as e: except Exception as e:
logger.error(f"Error validating persona {persona_id}: {e}") logger.error(f"Error validating persona {persona_id}: {e}")
raise e raise e