format
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user