avartha-python-sdk 0.0.6__tar.gz → 0.0.7__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.7}/MANIFEST.in +2 -1
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/PKG-INFO +6 -4
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/README.md +69 -31
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/docs/compatibility.md +153 -14
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/docs/migration.md +48 -20
- avartha_python_sdk-0.0.7/docs/platform.md +302 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/docs/pypi.md +5 -3
- avartha_python_sdk-0.0.7/docs/voice-conversations.md +282 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/examples/realtime.py +10 -3
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/examples/realtime_asr.py +31 -12
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/examples/tts.py +30 -15
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/examples/tts_multi_context.py +11 -1
- avartha_python_sdk-0.0.7/examples/voice_conversation.py +41 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/__init__.py +7 -1
- avartha_python_sdk-0.0.7/src/avartha/_conversation_resources.py +555 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_openai_http.py +4 -1
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_realtime_asr.py +134 -5
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_realtime_openai.py +13 -1
- avartha_python_sdk-0.0.7/src/avartha/_realtime_sampling.py +77 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_realtime_tts.py +137 -28
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_speech_http.py +62 -6
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/control.py +528 -3
- avartha_python_sdk-0.0.7/src/avartha/conversational_ai/__init__.py +23 -0
- avartha_python_sdk-0.0.7/src/avartha/conversational_ai/conversation.py +747 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/elevenlabs.py +32 -13
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/realtime/speech.py +9 -1
- avartha_python_sdk-0.0.7/src/avartha/types/conversational_ai.py +77 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_params.py +8 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_params_param.py +9 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_session_create_request.py +8 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_session_create_request_param.py +9 -0
- avartha_python_sdk-0.0.7/src/avartha/types/voice_agents.py +213 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha_python_sdk.egg-info/PKG-INFO +6 -4
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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/src/avartha/conversational_ai/__init__.py +0 -5
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/LICENSE +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/THIRD_PARTY_NOTICES +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/pyproject.toml +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/setup.cfg +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/setup.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_exceptions.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_http_errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_models.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_openai_http_errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_pacing.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_realtime_resources.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_sentinels.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_speech_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_speech_resources.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_unsupported.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_websocket.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/_ws_state.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/client.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/errors.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/openai.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/pagination.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/py.typed +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/resources/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/resources/models.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/resources/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/resources/realtime/realtime.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/audio/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/audio/transcription_language.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/audio_transcription.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/audio_transcription_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_added.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_create_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_create_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_delete_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_delete_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_deleted_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_done.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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.7}/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.7}/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.7}/src/avartha/types/realtime/conversation_item_input_audio_transcription_segment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_retrieve_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_retrieve_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_truncate_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_truncate_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/conversation_item_truncated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_append_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_append_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_clear_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_clear_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_cleared_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_commit_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_commit_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_committed_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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.7}/src/avartha/types/realtime/input_audio_buffer_speech_started_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_speech_stopped_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/input_audio_buffer_timeout_triggered.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/log_prob_properties.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/mcp_list_tools_completed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/mcp_list_tools_failed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/mcp_list_tools_in_progress.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/noise_reduction_type.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/output_audio_buffer_clear_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/output_audio_buffer_clear_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/rate_limits_updated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config_input.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config_input_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config_output_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_formats.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_formats_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_input_turn_detection.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_audio_input_turn_detection_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_client_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_client_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_assistant_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_assistant_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_function_call.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_function_call_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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.7}/src/avartha/types/realtime/realtime_conversation_item_function_call_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_system_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_system_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_user_message.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_conversation_item_user_message_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_error_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_function_tool.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_function_tool_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_approval_request.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_approval_request_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_approval_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_approval_response_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_list_tools.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_list_tools_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_protocol_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_protocol_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_tool_call.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_tool_call_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_tool_execution_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcp_tool_execution_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcphttp_error.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_mcphttp_error_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_reasoning.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_reasoning_effort.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_reasoning_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_audio_output.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_audio_output_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_mcp_tool.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_create_mcp_tool_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_usage.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_usage_input_token_details.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_response_usage_output_token_details.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_server_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tool_choice_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tool_choice_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tools_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tools_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tools_config_union.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tracing_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_tracing_config_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_transcription_session_audio.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_transcription_session_audio_input.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_transcription_session_audio_input_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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.7}/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.7}/src/avartha/types/realtime/realtime_transcription_session_audio_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_transcription_session_create_request.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_transcription_session_create_request_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_truncation.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_truncation_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_truncation_retention_ratio.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/realtime_truncation_retention_ratio_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_audio_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_audio_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_audio_transcript_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_audio_transcript_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_cancel_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_cancel_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_content_part_added_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_content_part_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_create_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_create_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_function_call_arguments_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_function_call_arguments_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_mcp_call_arguments_delta.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_mcp_call_arguments_done.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_mcp_call_completed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_mcp_call_failed.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_mcp_call_in_progress.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_output_item_added_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_output_item_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_text_delta_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/response_text_done_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/session_created_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/session_update_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/session_update_event_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/realtime/session_updated_event.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/image_detail.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_file.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_file_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_image.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_image_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_text.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_input_text_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_prompt.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/response_prompt_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/tool_choice_function.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/tool_choice_function_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/tool_choice_mcp.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/tool_choice_mcp_param.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/responses/tool_choice_options.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/shared/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/shared/metadata.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/shared_params/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/shared_params/metadata.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/__init__.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/alignment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/audio_output_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/close_context.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/close_socket.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/final_output_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/fine_tuning_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/fine_tuning_response_state_value.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/flush_context.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/generation_config.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/get_voices_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/get_voices_v_2_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/initialize_connection_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/language_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/manual_verification_file_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/manual_verification_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/model_rates_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/normalized_alignment.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/output_format.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/pronunciation_dictionary_locator.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/reader_resource_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/reader_resource_response_model_resource_type.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/realtime_voice_settings.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/recording_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/review_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/send_text_multi.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/speaker_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/speaker_separation_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/speaker_separation_response_model_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/utterance_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/verification_attempt_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/verified_voice_language_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_category.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_labelling_status.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_recording_quality.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_safety_control.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_sample.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_settings.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_sharing_moderation_check_response_model.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_sharing_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_sharing_response_category.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_sharing_state.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech/voice_verification_response.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/speech_language.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/websocket_connection_options.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha/types/websocket_reconnection.py +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha_python_sdk.egg-info/dependency_links.txt +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/src/avartha_python_sdk.egg-info/requires.txt +0 -0
- {avartha_python_sdk-0.0.6 → avartha_python_sdk-0.0.7}/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.7
|
|
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
|
|
@@ -109,12 +109,14 @@ Inference consumes credits.
|
|
|
109
109
|
| Realtime ASR | `await client.speech_to_text.realtime.connect(...)` on either speech client |
|
|
110
110
|
| Speech discovery | Speech clients: models, voices, voice settings, ASR languages |
|
|
111
111
|
| Workspaces, members, invitations | `Control` / `AsyncControl` |
|
|
112
|
+
| Voice agents: create, edit, publish, restore, delete | `Control` / `AsyncControl`: `voice_agents` |
|
|
113
|
+
| Live conversations with published agents | `avartha.conversational_ai`: `Conversation`, `AsyncConversation` |
|
|
114
|
+
| Placing phone calls from Twilio numbers | `ElevenLabs` / `AsyncElevenLabs`: `conversational_ai.twilio.outbound_call` |
|
|
112
115
|
| Combined inference and management | `Avartha` / `AsyncAvartha` |
|
|
113
116
|
|
|
114
117
|
Managed inference uses WebSockets; Chat Completions, Responses, HTTP TTS,
|
|
115
|
-
and file transcription are unavailable.
|
|
116
|
-
|
|
117
|
-
`NotImplementedError`.
|
|
118
|
+
and file transcription are unavailable. ElevenLabs-schema agent management is not
|
|
119
|
+
implemented, and accessing it under `conversational_ai` raises `NotImplementedError`.
|
|
118
120
|
|
|
119
121
|
## Migrating and handling errors
|
|
120
122
|
|
|
@@ -137,7 +137,9 @@ async def main():
|
|
|
137
137
|
asyncio.run(main())
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
[Complete Realtime example](examples/realtime.py).
|
|
140
|
+
[Complete Realtime example](examples/realtime.py). Avartha also accepts
|
|
141
|
+
`temperature` and other [sampling controls](docs/compatibility.md#sampling-controls)
|
|
142
|
+
in `session.update` and `response.create`.
|
|
141
143
|
|
|
142
144
|
## Streaming speech
|
|
143
145
|
|
|
@@ -161,9 +163,9 @@ with ElevenLabs() as client:
|
|
|
161
163
|
print(voice.voice_id)
|
|
162
164
|
```
|
|
163
165
|
|
|
164
|
-
Stream text over a WebSocket with `convert_realtime`.
|
|
165
|
-
|
|
166
|
-
This example
|
|
166
|
+
Stream text over a WebSocket with `convert_realtime`. The runtime converts the
|
|
167
|
+
model's audio to the `output_format` you select: raw PCM at 8 to 48 kHz, MP3, or
|
|
168
|
+
G.711 (`ulaw_8000`, `alaw_8000`). This example writes 24 kHz PCM to a WAV file:
|
|
167
169
|
|
|
168
170
|
```python
|
|
169
171
|
import wave
|
|
@@ -184,7 +186,9 @@ with ElevenLabs() as client:
|
|
|
184
186
|
output.writeframes(chunk)
|
|
185
187
|
```
|
|
186
188
|
|
|
187
|
-
The default output format is `pcm_24000`.
|
|
189
|
+
The default output format is `pcm_24000`. See
|
|
190
|
+
[output formats, timeouts, and timestamps](docs/compatibility.md#output-formats-timeouts-and-timestamps)
|
|
191
|
+
for every format, `inactivity_timeout`, and character timestamps. Use `AsyncElevenLabs` and `async for`
|
|
188
192
|
for async TTS; the async client's `text` accepts either a regular iterable or
|
|
189
193
|
an async iterable. Run the
|
|
190
194
|
[TTS example](examples/tts.py) with `--async` to use that client.
|
|
@@ -239,44 +243,74 @@ options instead.
|
|
|
239
243
|
File-based HTTP `speech_to_text.convert` is retired on managed inference.
|
|
240
244
|
|
|
241
245
|
Connection options cover background speech filtering, vocabulary hints,
|
|
242
|
-
manual/VAD commits,
|
|
243
|
-
labels on supported models. Register `RealtimeEvents.WARNING` for nonfatal
|
|
246
|
+
manual/VAD commits, semantic turn detection, word log probabilities, timestamps,
|
|
247
|
+
and speaker labels on supported models. Register `RealtimeEvents.WARNING` for nonfatal
|
|
244
248
|
warnings, including unavailable timing metadata. See
|
|
245
249
|
[ASR options and callbacks](docs/migration.md#recognition-and-context-hints)
|
|
246
250
|
for configuration and server requirements.
|
|
247
251
|
|
|
248
252
|
## Agents
|
|
249
253
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
254
|
+
`Control.voice_agents` creates, edits, publishes, restores, and deletes Avartha voice
|
|
255
|
+
agents, using the platform's own schema. See [voice agents](docs/platform.md#voice-agents) for an
|
|
256
|
+
example and the access each operation needs:
|
|
253
257
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
conversations.
|
|
258
|
+
```python
|
|
259
|
+
from avartha import Control
|
|
257
260
|
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
with Control() as client:
|
|
262
|
+
agent = client.voice_agents.create(
|
|
263
|
+
"your-workspace-id",
|
|
264
|
+
name="Support",
|
|
265
|
+
template_id="blank",
|
|
266
|
+
config={"schema_version": 1, "instructions": "Answer questions concisely."},
|
|
267
|
+
)
|
|
268
|
+
print(agent["id"], agent["generation"])
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Hold a live conversation with a published agent using `Conversation` or
|
|
272
|
+
`AsyncConversation`. They follow the ElevenLabs conversation client for the subset the
|
|
273
|
+
platform supports. See [voice conversations](docs/voice-conversations.md) for speech,
|
|
274
|
+
per-call options, and conversation records:
|
|
260
275
|
|
|
261
276
|
```python
|
|
277
|
+
import time
|
|
278
|
+
|
|
262
279
|
from avartha import ElevenLabs
|
|
280
|
+
from avartha.conversational_ai import Conversation
|
|
263
281
|
|
|
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
|
-
},
|
|
282
|
+
with ElevenLabs() as client:
|
|
283
|
+
conversation = Conversation(
|
|
284
|
+
client,
|
|
285
|
+
"your-agent-id",
|
|
286
|
+
requires_auth=False,
|
|
287
|
+
callback_agent_response=lambda text: print("Agent:", text),
|
|
274
288
|
)
|
|
275
|
-
|
|
289
|
+
conversation.start_session()
|
|
290
|
+
conversation.wait_for_session_start()
|
|
291
|
+
conversation.send_user_message("What can you help me with?")
|
|
292
|
+
time.sleep(15) # Replies arrive through the callbacks.
|
|
293
|
+
conversation.end_session()
|
|
294
|
+
conversation.wait_for_session_end()
|
|
276
295
|
```
|
|
277
296
|
|
|
278
|
-
|
|
279
|
-
`
|
|
297
|
+
An agent can also call someone from one of the workspace's Twilio numbers. Pass an
|
|
298
|
+
`idempotency_key`, so a retry can't ring them twice, and check `placed.success`:
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
placed = client.conversational_ai.twilio.outbound_call(
|
|
302
|
+
agent_id="your-agent-id",
|
|
303
|
+
agent_phone_number_id="your-twilio-number-id",
|
|
304
|
+
to_number="+14155550100",
|
|
305
|
+
idempotency_key="order-1042-reminder",
|
|
306
|
+
)
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
See [placing a phone call](docs/voice-conversations.md#placing-a-phone-call) for its
|
|
310
|
+
prerequisites and how to follow the call.
|
|
311
|
+
|
|
312
|
+
ElevenLabs-schema agent management, tools, and knowledge bases are not implemented.
|
|
313
|
+
Accessing them under `client.conversational_ai` raises `NotImplementedError`.
|
|
280
314
|
|
|
281
315
|
## Using types
|
|
282
316
|
|
|
@@ -356,9 +390,13 @@ with OpenAI(timeout=30.0, max_retries=0) as client:
|
|
|
356
390
|
print(client.models.list())
|
|
357
391
|
```
|
|
358
392
|
|
|
359
|
-
HTTP and WebSocket retry settings are separate.
|
|
360
|
-
`client.realtime.connect(
|
|
361
|
-
|
|
393
|
+
HTTP and WebSocket retry settings are separate. Realtime reconnection is opt-in:
|
|
394
|
+
supply `on_reconnecting` to `client.realtime.connect(...)`. `max_retries` bounds
|
|
395
|
+
consecutive recovery attempts; a session greeting alone does not reset the budget.
|
|
396
|
+
Set `max_retries=0` to disable retries even when a callback is supplied.
|
|
397
|
+
A reconnect opens a fresh session. The SDK does not replay session configuration,
|
|
398
|
+
conversation history, or an interrupted response; the application must restore
|
|
399
|
+
its state. Use `websocket_connection_options` for transport settings and `asyncio.timeout`
|
|
362
400
|
when an async operation needs an overall deadline. Close active sessions when
|
|
363
401
|
cancelling. ElevenLabs `timeout` configures HTTP calls; it does not set a
|
|
364
402
|
WebSocket receive deadline. Platform management writes are never retried
|
|
@@ -20,16 +20,19 @@ use HTTP.
|
|
|
20
20
|
| Chat Completions, Responses, SSE, and OpenAI HTTP speech | Unavailable | Managed inference requires a Realtime connection |
|
|
21
21
|
| Speech models and voices | Typed sync/async HTTP discovery | A visible speech model; voice discovery requires a routable TTS model |
|
|
22
22
|
| 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 |
|
|
23
|
+
| Single-context TTS | Sync/async `convert_realtime` | A TTS model and voice; the runtime converts to the selected PCM, MP3 or G.711 format |
|
|
24
|
+
| 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
25
|
| Realtime ASR | Async connections on both speech clients | An ASR model supporting the supplied audio format and sample rate |
|
|
26
26
|
| HTTP TTS and file transcription | Unavailable | Use realtime speech methods |
|
|
27
|
-
|
|
|
27
|
+
| 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) |
|
|
28
|
+
| Placing phone calls | Sync/async `conversational_ai.twilio.outbound_call` | Outbound calling enabled, a key with `voice_calls_place`, a Twilio number, and a published agent; see [placing a phone call](voice-conversations.md#placing-a-phone-call) |
|
|
29
|
+
| ElevenLabs-schema agents, tools, knowledge bases | Not implemented | Accessing them under `conversational_ai` raises `NotImplementedError` |
|
|
30
|
+
| 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; the feature enabled; capacity to publish |
|
|
28
31
|
| Catalog, workspaces, members, and invitations | Sync/async `Control` | An Avartha API key with the required workspace role and allocation |
|
|
29
32
|
| API-key administration | Unavailable through `Control` | Use the platform portal; these operations require a browser session |
|
|
30
33
|
|
|
31
34
|
See [platform management](platform.md) for workspace roles, invitation
|
|
32
|
-
requirements, and permissions.
|
|
35
|
+
requirements, voice agents, and permissions.
|
|
33
36
|
|
|
34
37
|
## OpenAI Realtime text
|
|
35
38
|
|
|
@@ -50,6 +53,43 @@ serialization methods. The server must implement each requested feature.
|
|
|
50
53
|
Inspect `response.done.response.status` to distinguish successful completion
|
|
51
54
|
from failure, cancellation, or an incomplete response.
|
|
52
55
|
|
|
56
|
+
### Sampling controls
|
|
57
|
+
|
|
58
|
+
Avartha adds sampling controls to `session.update` and `response.create`:
|
|
59
|
+
`temperature`, `top_p`, `top_k`, `min_p`, `presence_penalty`,
|
|
60
|
+
`frequency_penalty`, and `repetition_penalty`. They are typed on
|
|
61
|
+
`RealtimeSessionCreateRequestParam` and `RealtimeResponseCreateParamsParam`.
|
|
62
|
+
They are not part of the upstream OpenAI GA Realtime contract, and are sent
|
|
63
|
+
unchanged. Omitted fields use the deployment's sampling preset, which can differ
|
|
64
|
+
by model, reasoning mode, and tool use. A session value applies to later
|
|
65
|
+
responses, and `None` restores the preset for that field. A response value
|
|
66
|
+
applies only to that response; `None` there keeps the session's value. A
|
|
67
|
+
`session.updated` event echoes only the sampling values a `session.update` set.
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
await connection.session.update(session={"type": "realtime", "temperature": 0.7})
|
|
71
|
+
await connection.response.create(response={"temperature": 0.2}) # this response only
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
A temperature below `0.00001` decodes greedily. In the same event, leave
|
|
75
|
+
`top_p`, `top_k`, and `min_p` unset or at their neutral values: `1`, `-1` or `0`,
|
|
76
|
+
and `0`. Values outside these ranges raise `ValueError` before a frame is sent
|
|
77
|
+
or queued, including through `send_raw()`:
|
|
78
|
+
|
|
79
|
+
| Field | Accepted values |
|
|
80
|
+
| --- | --- |
|
|
81
|
+
| `temperature` | A finite number from 0 to 2 |
|
|
82
|
+
| `top_p` | Greater than 0 and at most 1 |
|
|
83
|
+
| `top_k` | An integer: `-1` or `0` (disabled), or 1 to 2,147,483,647 |
|
|
84
|
+
| `min_p` | 0 to 1 |
|
|
85
|
+
| `presence_penalty`, `frequency_penalty` | -2 to 2 |
|
|
86
|
+
| `repetition_penalty` | A finite number greater than 0 |
|
|
87
|
+
|
|
88
|
+
Active penalties also require deployment support; otherwise the server refuses
|
|
89
|
+
them with an `error` event. Speech-to-text connections have no temperature setting.
|
|
90
|
+
|
|
91
|
+
### Unsupported operations
|
|
92
|
+
|
|
53
93
|
Explicit audio/transcription/image requests raise `UnsupportedOperationError`
|
|
54
94
|
before a frame is sent or queued. Audio event declarations remain importable for
|
|
55
95
|
schema compatibility. Unsupported HTTP resources, including Chat Completions,
|
|
@@ -165,6 +205,43 @@ This does not change when the serving model starts generating audio.
|
|
|
165
205
|
Both single-context and multi-context SDK helpers always send `auto_mode=true`.
|
|
166
206
|
The SDK does not support `auto_mode=False` or `default_mode`.
|
|
167
207
|
|
|
208
|
+
### Output formats, timeouts, and timestamps
|
|
209
|
+
|
|
210
|
+
`output_format` selects the delivery encoding and sample rate. The runtime
|
|
211
|
+
converts the model's native audio and keeps its channel count.
|
|
212
|
+
`TextToSpeechOutputFormat` lists the accepted values:
|
|
213
|
+
|
|
214
|
+
| Encoding | Formats |
|
|
215
|
+
| --- | --- |
|
|
216
|
+
| 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 |
|
|
217
|
+
| 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` |
|
|
218
|
+
| G.711 telephony | `ulaw_8000`, `alaw_8000` |
|
|
219
|
+
|
|
220
|
+
The SDK helpers send `DEFAULT_TTS_OUTPUT_FORMAT` (`pcm_24000`) when the argument
|
|
221
|
+
is omitted, so the delivered rate does not depend on the model. Audio bytes are
|
|
222
|
+
returned exactly as received: decode MP3 and G.711 with a matching decoder, and
|
|
223
|
+
play or wrap PCM at the selected rate. Conversion can add first-audio latency.
|
|
224
|
+
|
|
225
|
+
`inactivity_timeout` is an Avartha extension on `convert_realtime` and
|
|
226
|
+
`connect_multi_context`. It is the number of seconds, from 1 to 180, the
|
|
227
|
+
runtime waits for more text on a context before ending it; omission uses the
|
|
228
|
+
runtime's 20-second default. WebSocket pings keep the connection open but do not
|
|
229
|
+
reset this timer. In a multi-context session, `send(context_id, "")` refreshes
|
|
230
|
+
only that context. The platform's connection watchdog is separate: it closes a
|
|
231
|
+
connection after 90 seconds without traffic, or after `inactivity_timeout` plus
|
|
232
|
+
10 seconds when that is longer.
|
|
233
|
+
|
|
234
|
+
`connect_multi_context(..., sync_alignment=True)` requests approximate character
|
|
235
|
+
timings on timestamp-capable models. They arrive in
|
|
236
|
+
`AudioOutputMulti.normalized_alignment`, measured from the start of that
|
|
237
|
+
message's audio. Alignment requires PCM or G.711 output; MP3 packets do not share
|
|
238
|
+
the alignment clock. `convert_realtime` yields audio bytes only, so it has no
|
|
239
|
+
alignment option.
|
|
240
|
+
|
|
241
|
+
Out-of-range `inactivity_timeout` values, a non-boolean `sync_alignment`, and
|
|
242
|
+
`sync_alignment=True` with MP3 raise `ValueError` before connecting. For
|
|
243
|
+
`convert_realtime`, that happens when iteration starts.
|
|
244
|
+
|
|
168
245
|
Use `contextlib.closing(audio)` for the sync iterator or
|
|
169
246
|
`contextlib.aclosing(audio)` for the async iterator when playback may stop early.
|
|
170
247
|
Closing the iterator closes the socket and waits for its sender to stop. Started
|
|
@@ -258,17 +335,20 @@ budget of 1,000 burst frames and 250 frames/second. If a deployment advertises
|
|
|
258
335
|
different limits, pass its `websocket_limits` mapping to the `ElevenLabs` or
|
|
259
336
|
`AsyncElevenLabs` constructor. Limits are applied separately to each socket.
|
|
260
337
|
|
|
261
|
-
|
|
262
|
-
option in the SDK does not make it available on
|
|
338
|
+
`voice_settings`, character timestamps, and the native rate depend on the
|
|
339
|
+
selected model. Specifying an option in the SDK does not make it available on
|
|
340
|
+
the server. Runnable examples:
|
|
263
341
|
[single-context](../examples/tts.py), [multi-context](../examples/tts_multi_context.py).
|
|
264
342
|
|
|
265
343
|
## Realtime ASR
|
|
266
344
|
|
|
267
|
-
|
|
268
|
-
`
|
|
269
|
-
|
|
270
|
-
source
|
|
271
|
-
|
|
345
|
+
Audio-chunk mode sends samples unchanged. Supply matching `audio_format` and
|
|
346
|
+
`sample_rate`; mismatches raise `ValueError` before opening a socket. Supported
|
|
347
|
+
encodings and rates depend on the server. URL mode requires FFmpeg and converts
|
|
348
|
+
the source to 16 kHz mono PCM16. After a successful, nonempty source reaches EOF,
|
|
349
|
+
the SDK commits the final turn and keeps receiving transcript events until the
|
|
350
|
+
application closes the connection. FFmpeg failures emit `RealtimeEvents.ERROR`.
|
|
351
|
+
Custom client headers also apply to the ASR WebSocket handshake.
|
|
272
352
|
|
|
273
353
|
The SDK also preserves `previous_text` on audio chunks, but current ASR models
|
|
274
354
|
accept only omission, `null`, or an empty string. Nonempty values are rejected.
|
|
@@ -284,9 +364,68 @@ sent as `true` or `false`.
|
|
|
284
364
|
|
|
285
365
|
The server validates feature combinations and model availability. Diarization
|
|
286
366
|
requires timestamps and a model with speaker-label support. Timestamps also
|
|
287
|
-
depend on language support.
|
|
288
|
-
|
|
289
|
-
|
|
367
|
+
depend on language support. Background filtering and vocabulary hints also
|
|
368
|
+
depend on the model.
|
|
369
|
+
|
|
370
|
+
### Turn detection
|
|
371
|
+
|
|
372
|
+
`turn_model` takes `"silence"` (the default), `"smart_turn_v3"`, or
|
|
373
|
+
`"turn_eot_t3_v1"` (the `TurnModel` type) and requires
|
|
374
|
+
`commit_strategy=CommitStrategy.VAD`. The two semantic models estimate whether
|
|
375
|
+
a pause means the speaker has finished. The deployment must load the requested
|
|
376
|
+
model, and the server refuses one it has not loaded rather than substituting
|
|
377
|
+
another. Shipped Qwen3-ASR deployments load `turn_eot_t3_v1`; on them,
|
|
378
|
+
`smart_turn_v3` is refused.
|
|
379
|
+
|
|
380
|
+
| Setting | Accepted values | Default |
|
|
381
|
+
| --- | --- | --- |
|
|
382
|
+
| `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` |
|
|
383
|
+
| `vad_silence_threshold_secs` | 0.2 to 5.0 seconds | `1.0` with `silence`; `2.0` as the fallback with a semantic model |
|
|
384
|
+
| `vad_threshold` | Strictly between 0 and 1 | `0.5` |
|
|
385
|
+
| `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 |
|
|
386
|
+
| `min_silence_duration_ms` | An integer below the silence threshold in milliseconds | Model-dependent |
|
|
387
|
+
|
|
388
|
+
These settings raise `ValueError` before connecting when used without VAD
|
|
389
|
+
mode, when out of range, or, for `turn_threshold`, with `turn_model="silence"`
|
|
390
|
+
or no `turn_model`. `session_started.config` reports the effective values.
|
|
391
|
+
|
|
392
|
+
The silence threshold controls when buffered audio is submitted, not how quickly
|
|
393
|
+
the final transcript arrives. `connection.commit()` skips the remaining VAD
|
|
394
|
+
wait, but queueing, final decoding, and delivery still take time.
|
|
395
|
+
|
|
396
|
+
### Vocabulary hints and language
|
|
397
|
+
|
|
398
|
+
`keyterms` biases recognition toward the listed terms on Qwen3-ASR deployments
|
|
399
|
+
with context biasing. It does not guarantee a spelling. Each term is sent
|
|
400
|
+
unchanged as its own query parameter. The server trims each term before
|
|
401
|
+
counting, so the SDK checks these limits before connecting:
|
|
402
|
+
|
|
403
|
+
- at most 16 terms;
|
|
404
|
+
- at most 40 whitespace-separated words across all terms;
|
|
405
|
+
- at most 128 UTF-8 bytes per term;
|
|
406
|
+
- no blank terms or control characters.
|
|
407
|
+
|
|
408
|
+
The server also caps the terms' combined tokens at about 40. It tokenizes each
|
|
409
|
+
term separately with the model's tokenizer and reserves room for the separators
|
|
410
|
+
it adds between terms. Sixteen terms can therefore exceed the token cap,
|
|
411
|
+
especially invented names that use several tokens each. The
|
|
412
|
+
SDK cannot measure tokens; the server's refusal reports the measured count and
|
|
413
|
+
the limit. An error before `session_started` closes the connection.
|
|
414
|
+
|
|
415
|
+
`language_code` is an optional spoken-language hint, fixed for the connection.
|
|
416
|
+
Omit it for automatic detection; `""` and `"auto"` raise `ValueError`. Regional
|
|
417
|
+
forms such as `en-US` match their base language. Qwen3-ASR adds the hint to
|
|
418
|
+
its decoder prompt. A correct hint can leave the transcript unchanged, so it
|
|
419
|
+
does not guarantee an accuracy change. Check support with
|
|
420
|
+
`speech_to_text.languages.list(model_id=...)`.
|
|
421
|
+
|
|
422
|
+
### Session timing
|
|
423
|
+
|
|
424
|
+
Send the first audio chunk or commit within 30 seconds of connecting. WebSocket
|
|
425
|
+
pings do not count toward this deadline, and the server closes an idle new
|
|
426
|
+
session with an `input_error` event. After the first message, the server's
|
|
427
|
+
pings keep the connection open between utterances. The one-hour session
|
|
428
|
+
lifetime still applies. Close the connection when transcription is finished.
|
|
290
429
|
|
|
291
430
|
Transcript callbacks preserve server dictionaries, including `words` with
|
|
292
431
|
timing, speaker labels, and log probabilities when supplied.
|
|
@@ -76,6 +76,11 @@ Keep `client.realtime.connect`, `session.update`,
|
|
|
76
76
|
The same applies to `AsyncOpenAI` with `await` and `async for`.
|
|
77
77
|
[Complete usage examples](../README.md#usage).
|
|
78
78
|
|
|
79
|
+
The GA Realtime session has no `temperature`. Avartha accepts `temperature`
|
|
80
|
+
(0 to 2) and other sampling controls in `session.update` and as per-response
|
|
81
|
+
overrides in `response.create`; see
|
|
82
|
+
[sampling controls](compatibility.md#sampling-controls).
|
|
83
|
+
|
|
79
84
|
### Types, errors, and integrations
|
|
80
85
|
|
|
81
86
|
Replace `openai.types` imports with the corresponding `avartha.types` imports;
|
|
@@ -159,12 +164,19 @@ use `avartha.ApiError`. WebSocket exceptions retain the `websockets` classes.
|
|
|
159
164
|
| Speech discovery | `models.list`, `voices.get_all`, `voices.search`, `voices.get`, `voices.settings.get` | Typed sync/async HTTP resources |
|
|
160
165
|
| ASR languages | `speech_to_text.languages.list(model_id=...)` | Typed sync/async Avartha extension |
|
|
161
166
|
| HTTP TTS, file ASR | `text_to_speech.convert`, `text_to_speech.stream`, `speech_to_text.convert` | Unavailable in this SDK |
|
|
162
|
-
|
|
|
167
|
+
| Conversation sessions and history | `conversational_ai.conversation`, `conversational_ai.conversations` | A documented subset; see [voice conversations](voice-conversations.md) |
|
|
168
|
+
| Placing phone calls | `conversational_ai.twilio.outbound_call` | A documented subset; see [placing a phone call](voice-conversations.md#placing-a-phone-call) |
|
|
169
|
+
| Registering Twilio calls | `conversational_ai.twilio.register_call` | Unavailable in this SDK |
|
|
170
|
+
| Agents, tools, knowledge bases | `conversational_ai` | Not implemented |
|
|
163
171
|
|
|
164
172
|
Replace `avartha.legacy.ElevenLabs` and `avartha.legacy.AsyncElevenLabs` imports
|
|
165
173
|
with `avartha.ElevenLabs` and `avartha.AsyncElevenLabs`.
|
|
166
|
-
|
|
167
|
-
|
|
174
|
+
Accessing agents, tools, or knowledge bases under `conversational_ai` raises
|
|
175
|
+
`NotImplementedError`; Avartha's own voice agents use a different schema and are managed
|
|
176
|
+
with [`Control.voice_agents`](platform.md#voice-agents). Conversations use
|
|
177
|
+
`avartha.conversational_ai`; call `wait_for_session_start()` before sending, and pass
|
|
178
|
+
your own audio interface, because `DefaultAudioInterface` is not included. The
|
|
179
|
+
`play`/`save`/`stream` re-exports and `audio` extra were removed.
|
|
168
180
|
Write received PCM bytes to a WAV file or use your application's audio player;
|
|
169
181
|
see [the TTS example](../examples/tts.py).
|
|
170
182
|
|
|
@@ -219,9 +231,13 @@ See [supported HTTP endpoints and server prerequisites](compatibility.md#speech-
|
|
|
219
231
|
|
|
220
232
|
### Speech-specific configuration
|
|
221
233
|
|
|
222
|
-
Avartha TTS
|
|
223
|
-
|
|
224
|
-
or
|
|
234
|
+
Avartha TTS defaults to `pcm_24000`, unlike ElevenLabs' MP3 default. The
|
|
235
|
+
runtime converts to the selected `output_format`: raw PCM at 8 to 48 kHz, MP3,
|
|
236
|
+
or G.711 `ulaw_8000` and `alaw_8000`. See
|
|
237
|
+
[output formats](compatibility.md#output-formats-timeouts-and-timestamps).
|
|
238
|
+
Add a WAV header to PCM for a WAV file; the SDK returns the bytes unchanged.
|
|
239
|
+
`inactivity_timeout` (1 to 180 seconds) sets how long a context waits for more
|
|
240
|
+
text; the runtime default is 20 seconds.
|
|
225
241
|
Single-context and multi-context TTS always use `auto_mode=true`.
|
|
226
242
|
`auto_mode=False` and `default_mode` are unsupported.
|
|
227
243
|
|
|
@@ -291,7 +307,11 @@ It defaults to off and is separate from microphone echo cancellation.
|
|
|
291
307
|
Use `keyterms=["Avartha", "Kubernetes"]` for vocabulary hints on models that
|
|
292
308
|
support them. The SDK sends each term as a separate query parameter and handles
|
|
293
309
|
URL encoding. Hints do not guarantee a spelling and are not a free-form prompt.
|
|
294
|
-
|
|
310
|
+
Up to 16 terms and 40 words in total are accepted; the server also limits their
|
|
311
|
+
combined tokens, as described under
|
|
312
|
+
[vocabulary hints](compatibility.md#vocabulary-hints-and-language).
|
|
313
|
+
`language_code` hints the spoken language, such as `"en"` or `"en-US"`; omit it
|
|
314
|
+
for automatic detection. A hint does not guarantee a different transcript. Use
|
|
295
315
|
`speech_to_text.languages.list(model_id=...)` to check language support.
|
|
296
316
|
|
|
297
317
|
#### Ending an utterance
|
|
@@ -302,17 +322,21 @@ complete. This waits for the send, not the transcript: wait for
|
|
|
302
322
|
`RealtimeEvents.COMMITTED_TRANSCRIPT` before treating transcription as complete.
|
|
303
323
|
Do not commit an empty audio buffer as a completion check.
|
|
304
324
|
|
|
305
|
-
For automatic commits, use `commit_strategy=CommitStrategy.VAD`.
|
|
306
|
-
`turn_model="silence"
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
325
|
+
For automatic commits, use `commit_strategy=CommitStrategy.VAD`. Without
|
|
326
|
+
`turn_model`, or with `turn_model="silence"`, a turn ends after
|
|
327
|
+
`vad_silence_threshold_secs` of silence (1 second by default). Tune
|
|
328
|
+
`vad_threshold` for speech detection sensitivity. VAD controls require VAD mode;
|
|
329
|
+
the SDK raises `ValueError` if you pass them in manual mode.
|
|
330
|
+
|
|
331
|
+
Semantic turn detection uses an end-of-turn model to judge whether the speaker
|
|
332
|
+
has finished, so a hesitation need not end the utterance. Shipped Qwen3-ASR
|
|
333
|
+
deployments load `turn_model="turn_eot_t3_v1"`, with a `turn_threshold`
|
|
334
|
+
default of `0.79`. `turn_model="smart_turn_v3"` (default threshold `0.5`)
|
|
335
|
+
requires a deployment that loads it; the server refuses a model it has not loaded.
|
|
336
|
+
The threshold must be strictly between `0` and `1` and needs a semantic model.
|
|
337
|
+
Sustained silence still ends the turn after `vad_silence_threshold_secs`, which
|
|
338
|
+
defaults to 2 seconds with either semantic model. For example, inside an async
|
|
339
|
+
client context:
|
|
316
340
|
|
|
317
341
|
```python
|
|
318
342
|
from avartha import AudioFormat, CommitStrategy, RealtimeAudioOptions
|
|
@@ -322,12 +346,16 @@ options = RealtimeAudioOptions(
|
|
|
322
346
|
audio_format=AudioFormat.PCM_16000,
|
|
323
347
|
sample_rate=16000,
|
|
324
348
|
commit_strategy=CommitStrategy.VAD,
|
|
325
|
-
turn_model="
|
|
326
|
-
turn_threshold=0.
|
|
349
|
+
turn_model="turn_eot_t3_v1",
|
|
350
|
+
turn_threshold=0.79,
|
|
327
351
|
)
|
|
328
352
|
connection = await client.speech_to_text.realtime.connect(options)
|
|
329
353
|
```
|
|
330
354
|
|
|
355
|
+
`await connection.commit()` also works in VAD mode and skips the remaining
|
|
356
|
+
silence wait. Final decoding and delivery still take time after a commit.
|
|
357
|
+
See [turn detection](compatibility.md#turn-detection) for every range.
|
|
358
|
+
|
|
331
359
|
#### Transcript details
|
|
332
360
|
|
|
333
361
|
`include_logprobs=True` requests word log probabilities in final transcripts.
|