avartha-python-sdk 0.0.6__tar.gz → 0.0.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/MANIFEST.in +2 -1
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/PKG-INFO +16 -11
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/README.md +73 -42
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/docs/compatibility.md +217 -21
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/docs/migration.md +66 -35
- avartha_python_sdk-0.0.8/docs/platform.md +307 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/docs/pypi.md +15 -10
- avartha_python_sdk-0.0.8/docs/voice-conversations.md +196 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/examples/realtime.py +14 -3
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/examples/realtime_asr.py +33 -14
- avartha_python_sdk-0.0.8/examples/tts.py +86 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/examples/tts_multi_context.py +27 -3
- avartha_python_sdk-0.0.8/examples/voice_conversation.py +42 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/__init__.py +7 -1
- avartha_python_sdk-0.0.8/src/avartha/_conversation_resources.py +355 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_openai_http.py +4 -1
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_realtime_asr.py +134 -5
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_realtime_openai.py +13 -1
- avartha_python_sdk-0.0.8/src/avartha/_realtime_sampling.py +77 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_realtime_tts.py +197 -30
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_speech_http.py +46 -3
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/control.py +528 -3
- avartha_python_sdk-0.0.8/src/avartha/conversational_ai/__init__.py +23 -0
- avartha_python_sdk-0.0.8/src/avartha/conversational_ai/conversation.py +747 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/elevenlabs.py +32 -13
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/realtime/speech.py +9 -1
- avartha_python_sdk-0.0.8/src/avartha/types/conversational_ai.py +52 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_params.py +8 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_params_param.py +9 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_session_create_request.py +8 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_session_create_request_param.py +9 -0
- avartha_python_sdk-0.0.8/src/avartha/types/voice_agents.py +207 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha_python_sdk.egg-info/PKG-INFO +16 -11
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha_python_sdk.egg-info/SOURCES.txt +7 -0
- avartha_python_sdk-0.0.6/docs/platform.md +0 -127
- avartha_python_sdk-0.0.6/examples/tts.py +0 -62
- avartha_python_sdk-0.0.6/src/avartha/conversational_ai/__init__.py +0 -5
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/LICENSE +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/THIRD_PARTY_NOTICES +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/pyproject.toml +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/setup.cfg +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/setup.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_exceptions.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_http_errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_models.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_openai_http_errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_pacing.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_realtime_resources.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_sentinels.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_speech_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_speech_resources.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_unsupported.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_websocket.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/_ws_state.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/client.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/openai.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/pagination.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/py.typed +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/resources/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/resources/models.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/resources/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/resources/realtime/realtime.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/audio/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/audio/transcription_language.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/audio_transcription.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/audio_transcription_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_added.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_create_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_create_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_delete_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_delete_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_deleted_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_done.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_input_audio_transcription_completed_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_input_audio_transcription_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_input_audio_transcription_failed_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_input_audio_transcription_segment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_retrieve_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_retrieve_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_truncate_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_truncate_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/conversation_item_truncated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_append_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_append_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_clear_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_clear_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_cleared_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_commit_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_commit_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_committed_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_dtmf_event_received_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_speech_started_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_speech_stopped_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/input_audio_buffer_timeout_triggered.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/log_prob_properties.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/mcp_list_tools_completed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/mcp_list_tools_failed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/mcp_list_tools_in_progress.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/noise_reduction_type.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/output_audio_buffer_clear_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/output_audio_buffer_clear_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/rate_limits_updated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config_input.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config_input_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config_output_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_formats.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_formats_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_input_turn_detection.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_audio_input_turn_detection_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_client_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_client_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_assistant_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_assistant_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_function_call.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_function_call_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_function_call_output_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_function_call_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_system_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_system_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_user_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_conversation_item_user_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_error_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_function_tool.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_function_tool_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_approval_request.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_approval_request_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_approval_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_approval_response_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_list_tools.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_list_tools_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_protocol_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_protocol_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_tool_call.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_tool_call_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_tool_execution_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcp_tool_execution_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcphttp_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_mcphttp_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_reasoning.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_reasoning_effort.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_reasoning_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_audio_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_audio_output_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_mcp_tool.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_create_mcp_tool_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_usage.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_usage_input_token_details.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_response_usage_output_token_details.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_server_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tool_choice_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tool_choice_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tools_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tools_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tools_config_union.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tracing_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_tracing_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio_input.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio_input_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio_input_turn_detection.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio_input_turn_detection_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_audio_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_create_request.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_transcription_session_create_request_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_truncation.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_truncation_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_truncation_retention_ratio.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/realtime_truncation_retention_ratio_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_audio_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_audio_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_audio_transcript_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_audio_transcript_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_cancel_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_cancel_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_content_part_added_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_content_part_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_create_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_create_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_function_call_arguments_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_function_call_arguments_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_mcp_call_arguments_delta.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_mcp_call_arguments_done.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_mcp_call_completed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_mcp_call_failed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_mcp_call_in_progress.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_output_item_added_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_output_item_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_text_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/response_text_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/session_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/session_update_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/session_update_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/realtime/session_updated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/image_detail.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_file.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_file_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_image.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_image_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_text.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_input_text_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_prompt.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/response_prompt_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/tool_choice_function.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/tool_choice_function_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/tool_choice_mcp.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/tool_choice_mcp_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/responses/tool_choice_options.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/shared/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/shared/metadata.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/shared_params/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/shared_params/metadata.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/alignment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/audio_output_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/close_context.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/close_socket.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/final_output_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/fine_tuning_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/fine_tuning_response_state_value.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/flush_context.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/generation_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/get_voices_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/get_voices_v_2_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/initialize_connection_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/language_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/manual_verification_file_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/manual_verification_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/model_rates_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/normalized_alignment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/output_format.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/pronunciation_dictionary_locator.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/reader_resource_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/reader_resource_response_model_resource_type.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/realtime_voice_settings.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/recording_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/review_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/send_text_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/speaker_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/speaker_separation_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/speaker_separation_response_model_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/utterance_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/verification_attempt_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/verified_voice_language_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_category.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_labelling_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_recording_quality.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_safety_control.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_sample.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_settings.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_sharing_moderation_check_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_sharing_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_sharing_response_category.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_sharing_state.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech/voice_verification_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/speech_language.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/websocket_connection_options.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha/types/websocket_reconnection.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha_python_sdk.egg-info/dependency_links.txt +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha_python_sdk.egg-info/requires.txt +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.8}/src/avartha_python_sdk.egg-info/top_level.txt +0 -0
|
@@ -5,5 +5,6 @@ recursive-include src/avartha *.py py.typed
|
|
|
5
5
|
exclude src/avartha/_version.py
|
|
6
6
|
recursive-include src/avartha_python_sdk.egg-info PKG-INFO SOURCES.txt dependency_links.txt requires.txt top_level.txt
|
|
7
7
|
include docs/pypi.md docs/compatibility.md docs/migration.md docs/platform.md
|
|
8
|
+
include docs/voice-conversations.md
|
|
8
9
|
include examples/realtime.py examples/tts.py examples/tts_multi_context.py
|
|
9
|
-
include examples/realtime_asr.py
|
|
10
|
+
include examples/realtime_asr.py examples/voice_conversation.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: avartha-python-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.8
|
|
4
4
|
Summary: Python clients for Avartha Realtime text, streaming speech, and platform management
|
|
5
5
|
Author-email: "Avartha Inc." <team@avartha.ai>
|
|
6
6
|
License-Expression: LicenseRef-Avartha-Proprietary
|
|
@@ -33,11 +33,12 @@ Dynamic: license-file
|
|
|
33
33
|
|
|
34
34
|
Synchronous and asynchronous Python clients for Avartha Realtime text,
|
|
35
35
|
streaming speech, and platform management. Requires Python 3.12+.
|
|
36
|
+
The guides and examples below use SDK 0.0.7 or later.
|
|
36
37
|
|
|
37
38
|
## Install
|
|
38
39
|
|
|
39
40
|
```sh
|
|
40
|
-
python -m pip install avartha-python-sdk
|
|
41
|
+
python -m pip install --upgrade 'avartha-python-sdk>=0.0.7'
|
|
41
42
|
```
|
|
42
43
|
|
|
43
44
|
Configure your Avartha API key and platform root:
|
|
@@ -55,15 +56,18 @@ to your workspace. Unsupported tier values and dedicated inference URLs raise
|
|
|
55
56
|
## Discover models
|
|
56
57
|
|
|
57
58
|
```python
|
|
58
|
-
from avartha import
|
|
59
|
+
from avartha import Avartha
|
|
59
60
|
|
|
60
|
-
with
|
|
61
|
+
with Avartha() as client:
|
|
61
62
|
for model in client.models.list():
|
|
62
63
|
print(model.id, model.to_dict().get("protocols", []))
|
|
64
|
+
for model in client.elevenlabs.models.list():
|
|
65
|
+
print(model.model_id, getattr(model, "protocols", []))
|
|
63
66
|
```
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
speech
|
|
68
|
+
`client.models` lists Voice LLMs; choose `openai_realtime` for text.
|
|
69
|
+
`client.elevenlabs.models` lists speech models; choose `elevenlabs_tts` for
|
|
70
|
+
speech synthesis or `elevenlabs_asr` for speech recognition.
|
|
67
71
|
|
|
68
72
|
## Generate text
|
|
69
73
|
|
|
@@ -109,12 +113,13 @@ Inference consumes credits.
|
|
|
109
113
|
| Realtime ASR | `await client.speech_to_text.realtime.connect(...)` on either speech client |
|
|
110
114
|
| Speech discovery | Speech clients: models, voices, voice settings, ASR languages |
|
|
111
115
|
| Workspaces, members, invitations | `Control` / `AsyncControl` |
|
|
116
|
+
| Voice agents: create, edit, publish, restore, delete | `Control` / `AsyncControl`: `voice_agents` |
|
|
117
|
+
| Live conversations with published agents | `avartha.conversational_ai`: `Conversation`, `AsyncConversation` |
|
|
112
118
|
| Combined inference and management | `Avartha` / `AsyncAvartha` |
|
|
113
119
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
`NotImplementedError`.
|
|
120
|
+
This SDK provides model inference over WebSockets; it does not wrap HTTP
|
|
121
|
+
Chat Completions, Responses, speech synthesis, or file transcription. ElevenLabs-schema agent management is not
|
|
122
|
+
implemented, and accessing it under `conversational_ai` raises `NotImplementedError`.
|
|
118
123
|
|
|
119
124
|
## Migrating and handling errors
|
|
120
125
|
|
|
@@ -138,4 +143,4 @@ never retried automatically.
|
|
|
138
143
|
The [source archive on PyPI](https://pypi.org/project/avartha-python-sdk/#files)
|
|
139
144
|
includes `README.md`, customer guides in `docs/`, and runnable examples in
|
|
140
145
|
`examples/`. Download and unpack the archive to read the migration, compatibility,
|
|
141
|
-
and platform-management guides and run the text, speech, and
|
|
146
|
+
and platform-management guides and run the text, speech, and voice-agent examples.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Synchronous and asynchronous Python clients for Avartha Realtime LLMs,
|
|
6
6
|
streaming speech, and platform management. Requires Python 3.12+.
|
|
7
|
+
The guides and examples below use SDK 0.0.7 or later.
|
|
7
8
|
|
|
8
9
|
**Familiar Python interfaces for OpenAI Realtime and ElevenLabs speech.** Change
|
|
9
10
|
client, type, and exception imports, then configure Avartha credentials, URLs,
|
|
@@ -20,9 +21,11 @@ and model/voice IDs. The supported APIs use the same method names and event loop
|
|
|
20
21
|
```
|
|
21
22
|
|
|
22
23
|
Neither vendor SDK needs to be installed. Avartha supports Realtime text,
|
|
23
|
-
streaming speech, HTTP discovery, and platform management.
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
streaming speech, HTTP discovery, and platform management. This SDK uses
|
|
25
|
+
WebSockets for model inference. It does not wrap HTTP Chat Completions,
|
|
26
|
+
Responses, or speech synthesis. Enabled platform HTTP endpoints have their
|
|
27
|
+
own model and workspace prerequisites. See the guides below for supported
|
|
28
|
+
features and migration steps.
|
|
26
29
|
|
|
27
30
|
## Documentation
|
|
28
31
|
|
|
@@ -36,7 +39,7 @@ unavailable. See the guides below for supported features and migration steps.
|
|
|
36
39
|
Install from [PyPI](https://pypi.org/project/avartha-python-sdk/):
|
|
37
40
|
|
|
38
41
|
```sh
|
|
39
|
-
python -m pip install avartha-python-sdk
|
|
42
|
+
python -m pip install --upgrade 'avartha-python-sdk>=0.0.7'
|
|
40
43
|
```
|
|
41
44
|
|
|
42
45
|
Set your Avartha API key and platform root. Update `AVARTHA_BASE_URL` to match
|
|
@@ -88,16 +91,19 @@ and response on the same connection to preserve conversation state.
|
|
|
88
91
|
To discover available models and their enabled protocols:
|
|
89
92
|
|
|
90
93
|
```python
|
|
91
|
-
from avartha import
|
|
94
|
+
from avartha import Avartha
|
|
92
95
|
|
|
93
|
-
with
|
|
96
|
+
with Avartha() as client:
|
|
94
97
|
for model in client.models.list():
|
|
95
98
|
print(model.id, model.to_dict().get("protocols", []))
|
|
99
|
+
for model in client.elevenlabs.models.list():
|
|
100
|
+
print(model.model_id, getattr(model, "protocols", []))
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
Model availability depends on your workspace and environment. Replace
|
|
99
|
-
the example IDs with models returned for your key
|
|
100
|
-
`openai_realtime
|
|
104
|
+
the example IDs with models returned for your key. `client.models` lists
|
|
105
|
+
Voice LLMs; choose `openai_realtime` for text. `client.elevenlabs.models` lists
|
|
106
|
+
speech models; choose `elevenlabs_tts` or `elevenlabs_asr` for speech.
|
|
101
107
|
|
|
102
108
|
## Async usage
|
|
103
109
|
|
|
@@ -137,7 +143,9 @@ async def main():
|
|
|
137
143
|
asyncio.run(main())
|
|
138
144
|
```
|
|
139
145
|
|
|
140
|
-
[Complete Realtime example](examples/realtime.py).
|
|
146
|
+
[Complete Realtime example](examples/realtime.py). Avartha also accepts
|
|
147
|
+
`temperature` and other [sampling controls](docs/compatibility.md#sampling-controls)
|
|
148
|
+
in `session.update` and `response.create`.
|
|
141
149
|
|
|
142
150
|
## Streaming speech
|
|
143
151
|
|
|
@@ -161,12 +169,13 @@ with ElevenLabs() as client:
|
|
|
161
169
|
print(voice.voice_id)
|
|
162
170
|
```
|
|
163
171
|
|
|
164
|
-
Stream text over a WebSocket with `convert_realtime`.
|
|
165
|
-
|
|
166
|
-
This example
|
|
172
|
+
Stream text over a WebSocket with `convert_realtime`. The runtime converts the
|
|
173
|
+
model's audio to the `output_format` you select: raw PCM at 8 to 48 kHz, MP3, or
|
|
174
|
+
G.711 (`ulaw_8000`, `alaw_8000`). This example writes 24 kHz PCM to a WAV file:
|
|
167
175
|
|
|
168
176
|
```python
|
|
169
177
|
import wave
|
|
178
|
+
from contextlib import closing
|
|
170
179
|
from avartha import ElevenLabs
|
|
171
180
|
|
|
172
181
|
with ElevenLabs() as client:
|
|
@@ -176,7 +185,7 @@ with ElevenLabs() as client:
|
|
|
176
185
|
output_format="pcm_24000",
|
|
177
186
|
text=iter(["Welcome. ", "How can I help?"]),
|
|
178
187
|
)
|
|
179
|
-
with wave.open("welcome.wav", "wb") as output:
|
|
188
|
+
with closing(audio), wave.open("welcome.wav", "wb") as output:
|
|
180
189
|
output.setnchannels(1)
|
|
181
190
|
output.setsampwidth(2)
|
|
182
191
|
output.setframerate(24000)
|
|
@@ -184,7 +193,9 @@ with ElevenLabs() as client:
|
|
|
184
193
|
output.writeframes(chunk)
|
|
185
194
|
```
|
|
186
195
|
|
|
187
|
-
The default output format is `pcm_24000`.
|
|
196
|
+
The default output format is `pcm_24000`. See
|
|
197
|
+
[output formats, timeouts, and timestamps](docs/compatibility.md#output-formats-timeouts-and-timestamps)
|
|
198
|
+
for every format, `inactivity_timeout`, and character timestamps. Use `AsyncElevenLabs` and `async for`
|
|
188
199
|
for async TTS; the async client's `text` accepts either a regular iterable or
|
|
189
200
|
an async iterable. Run the
|
|
190
201
|
[TTS example](examples/tts.py) with `--async` to use that client.
|
|
@@ -221,8 +232,9 @@ Use `AsyncAvartha` or `AsyncElevenLabs` for an async application. See the
|
|
|
221
232
|
[live STT execution guidance](docs/migration.md#live-speech-to-text) for scripts
|
|
222
233
|
and applications with an existing event loop.
|
|
223
234
|
|
|
224
|
-
|
|
225
|
-
|
|
235
|
+
ASR accepts mono PCM16 at 8, 16, 22.05, 24, 44.1, or 48 kHz, and 8 kHz mu-law.
|
|
236
|
+
Choose the `AudioFormat` and `sample_rate` that match your samples; the server
|
|
237
|
+
resamples them, and the SDK sends chunks unchanged.
|
|
226
238
|
Await a committed transcript before closing the session.
|
|
227
239
|
[The complete example](examples/realtime_asr.py) reads a WAV file, registers
|
|
228
240
|
transcript/error callbacks, streams chunks, commits, and closes the connection:
|
|
@@ -239,44 +251,59 @@ options instead.
|
|
|
239
251
|
File-based HTTP `speech_to_text.convert` is retired on managed inference.
|
|
240
252
|
|
|
241
253
|
Connection options cover background speech filtering, vocabulary hints,
|
|
242
|
-
manual/VAD commits,
|
|
243
|
-
labels on supported models. Register `RealtimeEvents.WARNING` for nonfatal
|
|
254
|
+
manual/VAD commits, semantic turn detection, word log probabilities, timestamps,
|
|
255
|
+
and speaker labels on supported models. Register `RealtimeEvents.WARNING` for nonfatal
|
|
244
256
|
warnings, including unavailable timing metadata. See
|
|
245
257
|
[ASR options and callbacks](docs/migration.md#recognition-and-context-hints)
|
|
246
258
|
for configuration and server requirements.
|
|
247
259
|
|
|
248
260
|
## Agents
|
|
249
261
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
262
|
+
`Control.voice_agents` creates, edits, publishes, restores, and deletes Avartha voice
|
|
263
|
+
agents, using the platform's own schema. See [voice agents](docs/platform.md#voice-agents) for an
|
|
264
|
+
example and the access each operation needs:
|
|
265
|
+
|
|
266
|
+
```python
|
|
267
|
+
from avartha import Control
|
|
253
268
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
with Control() as client:
|
|
270
|
+
agent = client.voice_agents.create(
|
|
271
|
+
"your-workspace-id",
|
|
272
|
+
name="Support",
|
|
273
|
+
template_id="blank",
|
|
274
|
+
config={"schema_version": 1, "instructions": "Answer questions concisely."},
|
|
275
|
+
)
|
|
276
|
+
print(agent["id"], agent["generation"])
|
|
277
|
+
```
|
|
257
278
|
|
|
258
|
-
|
|
259
|
-
|
|
279
|
+
Hold a live conversation with a published agent using `Conversation` or
|
|
280
|
+
`AsyncConversation`. They follow the ElevenLabs conversation client for the subset the
|
|
281
|
+
platform supports. See [voice conversations](docs/voice-conversations.md) for speech,
|
|
282
|
+
per-call options, and conversation records:
|
|
260
283
|
|
|
261
284
|
```python
|
|
285
|
+
import time
|
|
286
|
+
|
|
262
287
|
from avartha import ElevenLabs
|
|
288
|
+
from avartha.conversational_ai import Conversation
|
|
263
289
|
|
|
264
|
-
with ElevenLabs(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
"prompt": {"prompt": "Help customers find concise, accurate answers."},
|
|
271
|
-
},
|
|
272
|
-
"tts": {"voice_id": "your-voice"},
|
|
273
|
-
},
|
|
290
|
+
with ElevenLabs() as client:
|
|
291
|
+
conversation = Conversation(
|
|
292
|
+
client,
|
|
293
|
+
"your-agent-id",
|
|
294
|
+
requires_auth=False,
|
|
295
|
+
callback_agent_response=lambda text: print("Agent:", text),
|
|
274
296
|
)
|
|
275
|
-
|
|
297
|
+
conversation.start_session()
|
|
298
|
+
conversation.wait_for_session_start()
|
|
299
|
+
conversation.send_user_message("What can you help me with?")
|
|
300
|
+
time.sleep(15) # Replies arrive through the callbacks.
|
|
301
|
+
conversation.end_session()
|
|
302
|
+
conversation.wait_for_session_end()
|
|
276
303
|
```
|
|
277
304
|
|
|
278
|
-
|
|
279
|
-
|
|
305
|
+
ElevenLabs-schema agent management, tools, and knowledge bases are not implemented.
|
|
306
|
+
Accessing them under `client.conversational_ai` raises `NotImplementedError`.
|
|
280
307
|
|
|
281
308
|
## Using types
|
|
282
309
|
|
|
@@ -356,9 +383,13 @@ with OpenAI(timeout=30.0, max_retries=0) as client:
|
|
|
356
383
|
print(client.models.list())
|
|
357
384
|
```
|
|
358
385
|
|
|
359
|
-
HTTP and WebSocket retry settings are separate.
|
|
360
|
-
`client.realtime.connect(
|
|
361
|
-
|
|
386
|
+
HTTP and WebSocket retry settings are separate. Realtime reconnection is opt-in:
|
|
387
|
+
supply `on_reconnecting` to `client.realtime.connect(...)`. `max_retries` bounds
|
|
388
|
+
consecutive recovery attempts; a session greeting alone does not reset the budget.
|
|
389
|
+
Set `max_retries=0` to disable retries even when a callback is supplied.
|
|
390
|
+
A reconnect opens a fresh session. The SDK does not replay session configuration,
|
|
391
|
+
conversation history, or an interrupted response; the application must restore
|
|
392
|
+
its state. Use `websocket_connection_options` for transport settings and `asyncio.timeout`
|
|
362
393
|
when an async operation needs an overall deadline. Close active sessions when
|
|
363
394
|
cancelling. ElevenLabs `timeout` configures HTTP calls; it does not set a
|
|
364
395
|
WebSocket receive deadline. Platform management writes are never retried
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Compatibility and server support
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This guide covers Avartha Python SDK 0.0.7 or later. Avartha supports the
|
|
4
|
+
OpenAI Python 3.13.0 Realtime text interface and the
|
|
4
5
|
ElevenLabs Python 2.68.0 realtime speech and discovery interfaces. Neither
|
|
5
6
|
vendor SDK needs to be installed. Import clients, types, and exceptions from
|
|
6
7
|
Avartha; see the [migration guide](migration.md).
|
|
@@ -9,27 +10,32 @@ Avartha; see the [migration guide](migration.md).
|
|
|
9
10
|
|
|
10
11
|
SDK support and server availability are separate. Select a model available to
|
|
11
12
|
your workspace on serverless inference, and use only the features that model supports.
|
|
12
|
-
|
|
13
|
-
use HTTP.
|
|
13
|
+
These SDK model clients provide inference over WebSockets. Discovery and platform
|
|
14
|
+
management use HTTP. The platform also has enabled HTTP inference routes that
|
|
15
|
+
this SDK does not wrap: OpenAI speech/batch and Decisions, plus Chat Completions
|
|
16
|
+
for authorized OpenRouter-provider workspaces. Those routes do not imply that
|
|
17
|
+
ordinary workspace keys can use HTTP LLM inference.
|
|
14
18
|
|
|
15
19
|
| Surface | SDK support | Server prerequisites |
|
|
16
20
|
| --- | --- | --- |
|
|
17
21
|
| OpenAI Realtime text | Sync/async `realtime.connect()` | A model supporting `openai_realtime` and the requested session options |
|
|
18
22
|
| OpenAI model discovery | Sync/async `models.list()` and `models.retrieve(model)` | A valid Avartha key; results depend on workspace |
|
|
19
23
|
| OpenAI Realtime audio, transcription, images, and beta API | Unavailable | Use speech clients for supported audio workflows |
|
|
20
|
-
| Chat Completions, Responses, SSE, and OpenAI HTTP speech |
|
|
24
|
+
| Chat Completions, Responses, SSE, and OpenAI HTTP speech | No SDK wrappers | Enabled platform HTTP routes have separate prerequisites; use Realtime for this SDK’s model clients |
|
|
21
25
|
| Speech models and voices | Typed sync/async HTTP discovery | A visible speech model; voice discovery requires a routable TTS model |
|
|
22
26
|
| ASR languages | Sync/async `speech_to_text.languages.list(model_id=...)` | A routable ASR model; language hints depend on the model |
|
|
23
|
-
| Single-context TTS | Sync/async `convert_realtime` | A TTS model and voice
|
|
24
|
-
| Multi-context TTS | Sync/async `connect_multi_context` | A model supporting multiple contexts; each utterance needs a new context ID |
|
|
27
|
+
| Single-context TTS | Sync/async `convert_realtime` | A TTS model and voice; the runtime converts to the selected PCM, MP3 or G.711 format |
|
|
28
|
+
| Multi-context TTS | Sync/async `connect_multi_context` | A model supporting multiple contexts; each utterance needs a new context ID. Character timestamps need a timestamp-capable model |
|
|
25
29
|
| Realtime ASR | Async connections on both speech clients | An ASR model supporting the supplied audio format and sample rate |
|
|
26
|
-
| HTTP TTS and file transcription |
|
|
27
|
-
|
|
|
30
|
+
| HTTP TTS and file transcription | No SDK wrappers | Use these SDK realtime speech methods, or an explicitly enabled platform HTTP route |
|
|
31
|
+
| Live conversations and their history | Sync/async `Conversation`, `AsyncConversation`, and `conversational_ai.conversations` | A published agent and an API key for its workspace; see [voice conversations](voice-conversations.md) |
|
|
32
|
+
| ElevenLabs-schema agents, tools, knowledge bases | Not implemented | Accessing them under `conversational_ai` raises `NotImplementedError` |
|
|
33
|
+
| Avartha voice agents: create, read, edit, publish, restore, delete | Sync/async `Control.voice_agents` | An API key with voice-agent management access to that workspace; capacity to publish |
|
|
28
34
|
| Catalog, workspaces, members, and invitations | Sync/async `Control` | An Avartha API key with the required workspace role and allocation |
|
|
29
|
-
| API-key administration |
|
|
35
|
+
| API-key administration | No convenience resource; verified routes can use `Control.request` | A workspace-bound key with `keys` access and a creator who is still an Owner or Admin, or a console session |
|
|
30
36
|
|
|
31
37
|
See [platform management](platform.md) for workspace roles, invitation
|
|
32
|
-
requirements, and permissions.
|
|
38
|
+
requirements, voice agents, and permissions.
|
|
33
39
|
|
|
34
40
|
## OpenAI Realtime text
|
|
35
41
|
|
|
@@ -50,6 +56,76 @@ serialization methods. The server must implement each requested feature.
|
|
|
50
56
|
Inspect `response.done.response.status` to distinguish successful completion
|
|
51
57
|
from failure, cancellation, or an incomplete response.
|
|
52
58
|
|
|
59
|
+
A new connection can rebuild a saved conversation on a compatible model.
|
|
60
|
+
Before its first `response.create`, append the saved items in order: assistant
|
|
61
|
+
messages with `role: "assistant"` and `output_text` content, and each tool call
|
|
62
|
+
as a `function_call` item (`call_id`, `name`, and JSON-object `arguments`)
|
|
63
|
+
followed by its `function_call_output`. Wait for each item's acknowledgement
|
|
64
|
+
before requesting a reply. This rebuilds the input history, not the old session.
|
|
65
|
+
|
|
66
|
+
### Sampling controls
|
|
67
|
+
|
|
68
|
+
Avartha adds sampling controls to `session.update` and `response.create`:
|
|
69
|
+
`temperature`, `top_p`, `top_k`, `min_p`, `presence_penalty`,
|
|
70
|
+
`frequency_penalty`, and `repetition_penalty`. They are typed on
|
|
71
|
+
`RealtimeSessionCreateRequestParam` and `RealtimeResponseCreateParamsParam`.
|
|
72
|
+
They are not part of the upstream OpenAI GA Realtime contract, and are sent
|
|
73
|
+
unchanged. Omitted fields use the deployment's sampling preset, which can differ
|
|
74
|
+
by model, reasoning mode, and tool use. A session value applies to later
|
|
75
|
+
responses, and `None` restores the preset for that field. A response value
|
|
76
|
+
applies only to that response; `None` there keeps the session's value. A
|
|
77
|
+
`session.updated` event echoes only the sampling values a `session.update` set.
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
await connection.session.update(session={"type": "realtime", "temperature": 0.7})
|
|
81
|
+
await connection.response.create(response={"temperature": 0.2}) # this response only
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
A temperature below `0.00001` decodes greedily. In the same event, leave
|
|
85
|
+
`top_p`, `top_k`, and `min_p` unset or at their neutral values: `1`, `-1` or `0`,
|
|
86
|
+
and `0`. Values outside these ranges raise `ValueError` before a frame is sent
|
|
87
|
+
or queued, including through `send_raw()`:
|
|
88
|
+
|
|
89
|
+
| Field | Accepted values |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| `temperature` | A finite number from 0 to 2 |
|
|
92
|
+
| `top_p` | Greater than 0 and at most 1 |
|
|
93
|
+
| `top_k` | An integer: `-1` or `0` (disabled), or 1 to 2,147,483,647 |
|
|
94
|
+
| `min_p` | 0 to 1 |
|
|
95
|
+
| `presence_penalty`, `frequency_penalty` | -2 to 2 |
|
|
96
|
+
| `repetition_penalty` | A finite number greater than 0 |
|
|
97
|
+
|
|
98
|
+
Active penalties also require deployment support; otherwise the server refuses
|
|
99
|
+
them with an `error` event. Speech-to-text connections have no temperature setting.
|
|
100
|
+
|
|
101
|
+
### Native options beyond the typed schema
|
|
102
|
+
|
|
103
|
+
The SDK's public types cover its supported subset of the OpenAI schema and the
|
|
104
|
+
sampling controls above. Some Avartha Realtime extensions, including
|
|
105
|
+
`include_reasoning` and `reasoning.thinking_enabled`, are not yet declared in
|
|
106
|
+
those types. A supported runtime can receive them as explicit JSON:
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
import json
|
|
110
|
+
|
|
111
|
+
await connection.send_raw(
|
|
112
|
+
json.dumps(
|
|
113
|
+
{
|
|
114
|
+
"type": "session.update",
|
|
115
|
+
"session": {"type": "realtime", "include_reasoning": True},
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
This opts into reasoning output without changing the model's reasoning effort.
|
|
122
|
+
The synchronous connection uses the same call without `await`. Raw frames still
|
|
123
|
+
pass the SDK's text-only and sampling checks, and the server validates all
|
|
124
|
+
remaining fields. A field's absence from the Python type does not establish
|
|
125
|
+
server support; check the selected model and platform protocol documentation.
|
|
126
|
+
|
|
127
|
+
### Unsupported operations
|
|
128
|
+
|
|
53
129
|
Explicit audio/transcription/image requests raise `UnsupportedOperationError`
|
|
54
130
|
before a frame is sent or queued. Audio event declarations remain importable for
|
|
55
131
|
schema compatibility. Unsupported HTTP resources, including Chat Completions,
|
|
@@ -165,6 +241,59 @@ This does not change when the serving model starts generating audio.
|
|
|
165
241
|
Both single-context and multi-context SDK helpers always send `auto_mode=true`.
|
|
166
242
|
The SDK does not support `auto_mode=False` or `default_mode`.
|
|
167
243
|
|
|
244
|
+
### Output formats, timeouts, and timestamps
|
|
245
|
+
|
|
246
|
+
`output_format` selects the delivery encoding and sample rate. The runtime
|
|
247
|
+
converts the model's native audio and keeps its channel count.
|
|
248
|
+
`TextToSpeechOutputFormat` lists the accepted values:
|
|
249
|
+
|
|
250
|
+
| Encoding | Formats |
|
|
251
|
+
| --- | --- |
|
|
252
|
+
| Raw PCM16, little-endian, no WAV header | `pcm_8000`, `pcm_16000`, `pcm_22050`, `pcm_24000`, `pcm_32000`, `pcm_44100`, `pcm_48000`, or the model's native rate |
|
|
253
|
+
| MP3; the suffix is the bitrate in kbit/s | `mp3_22050_32`, `mp3_44100_32`, `mp3_44100_64`, `mp3_44100_96`, `mp3_44100_128`, `mp3_44100_192` |
|
|
254
|
+
| G.711 telephony | `ulaw_8000`, `alaw_8000` |
|
|
255
|
+
|
|
256
|
+
The SDK helpers send `DEFAULT_TTS_OUTPUT_FORMAT` (`pcm_24000`) when the argument
|
|
257
|
+
is omitted, so the delivered rate does not depend on the model. Audio bytes are
|
|
258
|
+
returned exactly as received: decode MP3 and G.711 with a matching decoder, and
|
|
259
|
+
play or wrap PCM at the selected rate. Conversion can add first-audio latency.
|
|
260
|
+
|
|
261
|
+
`inactivity_timeout` is an Avartha extension on `convert_realtime` and
|
|
262
|
+
`connect_multi_context`. It is the number of seconds, from 1 to 180, the
|
|
263
|
+
runtime waits for more text on a context before ending it; omission uses the
|
|
264
|
+
runtime's 20-second default. WebSocket pings keep the connection open but do not
|
|
265
|
+
reset this timer. In a multi-context session, `send(context_id, "")` refreshes
|
|
266
|
+
only that context. The platform's connection watchdog is separate: it closes a
|
|
267
|
+
connection after 90 seconds without traffic, or after `inactivity_timeout` plus
|
|
268
|
+
10 seconds when that is longer.
|
|
269
|
+
|
|
270
|
+
`connect_multi_context(..., sync_alignment=True)` requests approximate character
|
|
271
|
+
timings on timestamp-capable models. They arrive in
|
|
272
|
+
`AudioOutputMulti.normalized_alignment`, measured from the start of that
|
|
273
|
+
message's audio. Alignment requires PCM or G.711 output; MP3 packets do not share
|
|
274
|
+
the alignment clock. `convert_realtime` yields audio bytes only, so it has no
|
|
275
|
+
alignment option.
|
|
276
|
+
|
|
277
|
+
Out-of-range `inactivity_timeout` values, a non-boolean `sync_alignment`, and
|
|
278
|
+
`sync_alignment=True` with MP3 raise `ValueError` before connecting. For
|
|
279
|
+
`convert_realtime`, that happens when iteration starts.
|
|
280
|
+
|
|
281
|
+
### Voice settings, warnings, and other query parameters
|
|
282
|
+
|
|
283
|
+
ElevenLabs' `stability`, `similarity_boost`, and `style` (finite numbers from 0
|
|
284
|
+
to 1) and `use_speaker_boost` (a boolean) are accepted in `voice_settings` for
|
|
285
|
+
compatibility, but they do not change synthesis. `speed` must be omitted or 1.0.
|
|
286
|
+
Other names, types, and ranges are refused. When accepted settings have no
|
|
287
|
+
effect, the runtime sends a `warning` once per connection. The SDK logs it on
|
|
288
|
+
the `avartha._realtime_tts` logger at `WARNING` level and keeps streaming: a
|
|
289
|
+
warning never raises or settles a context.
|
|
290
|
+
|
|
291
|
+
Pass other documented stream parameters, such as `language_code`, in
|
|
292
|
+
`request_options={"additional_query_parameters": {...}}`. Values there override
|
|
293
|
+
the SDK's own query values, and `None` omits one. Some models cannot detect the
|
|
294
|
+
language of streamed text, so they refuse it unless `language_code` is set;
|
|
295
|
+
send `"en"` for English text.
|
|
296
|
+
|
|
168
297
|
Use `contextlib.closing(audio)` for the sync iterator or
|
|
169
298
|
`contextlib.aclosing(audio)` for the async iterator when playback may stop early.
|
|
170
299
|
Closing the iterator closes the socket and waits for its sender to stop. Started
|
|
@@ -258,17 +387,23 @@ budget of 1,000 burst frames and 250 frames/second. If a deployment advertises
|
|
|
258
387
|
different limits, pass its `websocket_limits` mapping to the `ElevenLabs` or
|
|
259
388
|
`AsyncElevenLabs` constructor. Limits are applied separately to each socket.
|
|
260
389
|
|
|
261
|
-
|
|
262
|
-
option in the SDK does not make it available on
|
|
390
|
+
`voice_settings`, character timestamps, and the native rate depend on the
|
|
391
|
+
selected model. Specifying an option in the SDK does not make it available on
|
|
392
|
+
the server. Runnable examples:
|
|
263
393
|
[single-context](../examples/tts.py), [multi-context](../examples/tts_multi_context.py).
|
|
264
394
|
|
|
265
395
|
## Realtime ASR
|
|
266
396
|
|
|
267
|
-
|
|
268
|
-
`
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
397
|
+
Audio-chunk mode sends samples unchanged. Supply matching `audio_format` and
|
|
398
|
+
`sample_rate`; mismatches raise `ValueError` before opening a socket. Every
|
|
399
|
+
`AudioFormat` value is accepted: mono PCM16 at 8, 16, 22.05, 24, 44.1, or 48 kHz,
|
|
400
|
+
and 8 kHz mu-law (`ULAW_8000`). The server resamples them for recognition. Send
|
|
401
|
+
raw samples without a file header; a chunk can hold at most 320,000 decoded bytes
|
|
402
|
+
and 160,000 samples, and must end on a sample boundary. URL mode requires FFmpeg and converts
|
|
403
|
+
the source to 16 kHz mono PCM16. After a successful, nonempty source reaches EOF,
|
|
404
|
+
the SDK commits the final turn and keeps receiving transcript events until the
|
|
405
|
+
application closes the connection. FFmpeg failures emit `RealtimeEvents.ERROR`.
|
|
406
|
+
Custom client headers also apply to the ASR WebSocket handshake.
|
|
272
407
|
|
|
273
408
|
The SDK also preserves `previous_text` on audio chunks, but current ASR models
|
|
274
409
|
accept only omission, `null`, or an empty string. Nonempty values are rejected.
|
|
@@ -284,9 +419,68 @@ sent as `true` or `false`.
|
|
|
284
419
|
|
|
285
420
|
The server validates feature combinations and model availability. Diarization
|
|
286
421
|
requires timestamps and a model with speaker-label support. Timestamps also
|
|
287
|
-
depend on language support.
|
|
288
|
-
|
|
289
|
-
|
|
422
|
+
depend on language support. Background filtering and vocabulary hints also
|
|
423
|
+
depend on the model.
|
|
424
|
+
|
|
425
|
+
### Turn detection
|
|
426
|
+
|
|
427
|
+
`turn_model` takes `"silence"` (the default), `"smart_turn_v3"`, or
|
|
428
|
+
`"turn_eot_t3_v1"` (the `TurnModel` type) and requires
|
|
429
|
+
`commit_strategy=CommitStrategy.VAD`. The two semantic models estimate whether
|
|
430
|
+
a pause means the speaker has finished. The deployment must load the requested
|
|
431
|
+
model, and the server refuses one it has not loaded rather than substituting
|
|
432
|
+
another. Shipped Qwen3-ASR deployments load `turn_eot_t3_v1`; on them,
|
|
433
|
+
`smart_turn_v3` is refused.
|
|
434
|
+
|
|
435
|
+
| Setting | Accepted values | Default |
|
|
436
|
+
| --- | --- | --- |
|
|
437
|
+
| `turn_threshold` | Strictly between 0 and 1; requires a semantic `turn_model` | `0.79` for `turn_eot_t3_v1`, `0.5` for `smart_turn_v3` |
|
|
438
|
+
| `vad_silence_threshold_secs` | 0.2 to 5.0 seconds | `1.0` with `silence`; `2.0` as the fallback with a semantic model |
|
|
439
|
+
| `vad_threshold` | Strictly between 0 and 1 | `0.5` |
|
|
440
|
+
| `min_speech_duration_ms` | An integer; rounded up to 32 ms frames, plus 300 ms, it must fit 8,000 ms (at most 7,680) | Model-dependent |
|
|
441
|
+
| `min_silence_duration_ms` | An integer below the silence threshold in milliseconds | Model-dependent |
|
|
442
|
+
|
|
443
|
+
These settings raise `ValueError` before connecting when used without VAD
|
|
444
|
+
mode, when out of range, or, for `turn_threshold`, with `turn_model="silence"`
|
|
445
|
+
or no `turn_model`. `session_started.config` reports the effective values.
|
|
446
|
+
|
|
447
|
+
The silence threshold controls when buffered audio is submitted, not how quickly
|
|
448
|
+
the final transcript arrives. `connection.commit()` skips the remaining VAD
|
|
449
|
+
wait, but queueing, final decoding, and delivery still take time.
|
|
450
|
+
|
|
451
|
+
### Vocabulary hints and language
|
|
452
|
+
|
|
453
|
+
`keyterms` biases recognition toward the listed terms on Qwen3-ASR deployments
|
|
454
|
+
with context biasing. It does not guarantee a spelling. Each term is sent
|
|
455
|
+
unchanged as its own query parameter. The server trims each term before
|
|
456
|
+
counting, so the SDK checks these limits before connecting:
|
|
457
|
+
|
|
458
|
+
- at most 16 terms;
|
|
459
|
+
- at most 40 whitespace-separated words across all terms;
|
|
460
|
+
- at most 128 UTF-8 bytes per term;
|
|
461
|
+
- no blank terms or control characters.
|
|
462
|
+
|
|
463
|
+
The server also caps the terms' combined tokens at about 40. It tokenizes each
|
|
464
|
+
term separately with the model's tokenizer and reserves room for the separators
|
|
465
|
+
it adds between terms. Sixteen terms can therefore exceed the token cap,
|
|
466
|
+
especially invented names that use several tokens each. The
|
|
467
|
+
SDK cannot measure tokens; the server's refusal reports the measured count and
|
|
468
|
+
the limit. An error before `session_started` closes the connection.
|
|
469
|
+
|
|
470
|
+
`language_code` is an optional spoken-language hint, fixed for the connection.
|
|
471
|
+
Omit it for automatic detection; `""` and `"auto"` raise `ValueError`. Regional
|
|
472
|
+
forms such as `en-US` match their base language. Qwen3-ASR adds the hint to
|
|
473
|
+
its decoder prompt. A correct hint can leave the transcript unchanged, so it
|
|
474
|
+
does not guarantee an accuracy change. Check support with
|
|
475
|
+
`speech_to_text.languages.list(model_id=...)`.
|
|
476
|
+
|
|
477
|
+
### Session timing
|
|
478
|
+
|
|
479
|
+
Send the first audio chunk or commit within 30 seconds of connecting. WebSocket
|
|
480
|
+
pings do not count toward this deadline, and the server closes an idle new
|
|
481
|
+
session with an `input_error` event. After the first message, the server's
|
|
482
|
+
pings keep the connection open between utterances. The one-hour session
|
|
483
|
+
lifetime still applies. Close the connection when transcription is finished.
|
|
290
484
|
|
|
291
485
|
Transcript callbacks preserve server dictionaries, including `words` with
|
|
292
486
|
timing, speaker labels, and log probabilities when supplied.
|
|
@@ -315,4 +509,6 @@ committed transcript remains usable. See the
|
|
|
315
509
|
fence. Pass `organization` or `project` explicitly to set them.
|
|
316
510
|
- The ASR token option is preserved, including suppression of the API-key header
|
|
317
511
|
when a token is supplied. Token issuance is a separate server prerequisite.
|
|
318
|
-
|
|
512
|
+
Published-agent signed URLs are available through
|
|
513
|
+
`conversational_ai.conversations.get_signed_url` and
|
|
514
|
+
`Conversation(requires_auth=True)`; see [voice conversations](voice-conversations.md).
|