sarvamai 0.1.7a0__tar.gz → 0.1.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.
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/PKG-INFO +1 -1
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/pyproject.toml +1 -1
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/__init__.py +48 -52
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/client.py +3 -3
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/client_wrapper.py +2 -2
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/service_unavailable_error.py +2 -1
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/__init__.py +20 -22
- sarvamai-0.1.8/src/sarvamai/requests/audio_output.py +11 -0
- sarvamai-0.1.8/src/sarvamai/requests/audio_output_data.py +15 -0
- sarvamai-0.1.8/src/sarvamai/requests/configure_connection.py +18 -0
- sarvamai-0.1.8/src/sarvamai/requests/configure_connection_data.py +83 -0
- sarvamai-0.1.8/src/sarvamai/requests/error_response.py +11 -0
- sarvamai-0.1.8/src/sarvamai/requests/error_response_data.py +18 -0
- sarvamai-0.1.8/src/sarvamai/requests/flush_signal.py +14 -0
- sarvamai-0.1.8/src/sarvamai/requests/ping_signal.py +14 -0
- sarvamai-0.1.8/src/sarvamai/requests/send_text.py +11 -0
- sarvamai-0.1.7a0/src/sarvamai/requests/base_job_parameters.py → sarvamai-0.1.8/src/sarvamai/requests/send_text_data.py +2 -2
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text/raw_client.py +9 -8
- sarvamai-0.1.8/src/sarvamai/text_to_speech_streaming/client.py +153 -0
- sarvamai-0.1.8/src/sarvamai/text_to_speech_streaming/raw_client.py +130 -0
- sarvamai-0.1.8/src/sarvamai/text_to_speech_streaming/socket_client.py +309 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/__init__.py +26 -28
- sarvamai-0.1.7a0/src/sarvamai/types/file_signed_url_details.py → sarvamai-0.1.8/src/sarvamai/types/audio_output.py +4 -3
- sarvamai-0.1.7a0/src/sarvamai/types/bulk_job_callback.py → sarvamai-0.1.8/src/sarvamai/types/audio_output_data.py +5 -5
- sarvamai-0.1.8/src/sarvamai/types/configure_connection.py +28 -0
- sarvamai-0.1.8/src/sarvamai/types/configure_connection_data.py +93 -0
- sarvamai-0.1.8/src/sarvamai/types/configure_connection_data_output_audio_bitrate.py +7 -0
- sarvamai-0.1.8/src/sarvamai/types/configure_connection_data_speaker.py +7 -0
- sarvamai-0.1.8/src/sarvamai/types/configure_connection_data_target_language_code.py +8 -0
- sarvamai-0.1.8/src/sarvamai/types/error_response.py +21 -0
- sarvamai-0.1.8/src/sarvamai/types/error_response_data.py +28 -0
- sarvamai-0.1.8/src/sarvamai/types/flush_signal.py +24 -0
- sarvamai-0.1.8/src/sarvamai/types/ping_signal.py +24 -0
- sarvamai-0.1.7a0/src/sarvamai/types/files_request.py → sarvamai-0.1.8/src/sarvamai/types/send_text.py +4 -3
- sarvamai-0.1.7a0/src/sarvamai/types/base_job_parameters.py → sarvamai-0.1.8/src/sarvamai/types/send_text_data.py +3 -1
- sarvamai-0.1.7a0/src/sarvamai/requests/bulk_job_callback.py +0 -15
- sarvamai-0.1.7a0/src/sarvamai/requests/bulk_job_init_response_v_1.py +0 -27
- sarvamai-0.1.7a0/src/sarvamai/requests/file_signed_url_details.py +0 -10
- sarvamai-0.1.7a0/src/sarvamai/requests/files_download_response.py +0 -15
- sarvamai-0.1.7a0/src/sarvamai/requests/files_request.py +0 -10
- sarvamai-0.1.7a0/src/sarvamai/requests/files_upload_response.py +0 -15
- sarvamai-0.1.7a0/src/sarvamai/requests/job_status_v_1.py +0 -70
- sarvamai-0.1.7a0/src/sarvamai/requests/speech_to_text_job_parameters.py +0 -32
- sarvamai-0.1.7a0/src/sarvamai/requests/task_detail_v_1.py +0 -15
- sarvamai-0.1.7a0/src/sarvamai/requests/task_file_details.py +0 -8
- sarvamai-0.1.7a0/src/sarvamai/speech_to_text_job/client.py +0 -454
- sarvamai-0.1.7a0/src/sarvamai/speech_to_text_job/raw_client.py +0 -1189
- sarvamai-0.1.7a0/src/sarvamai/types/bulk_job_init_response_v_1.py +0 -39
- sarvamai-0.1.7a0/src/sarvamai/types/files_download_response.py +0 -25
- sarvamai-0.1.7a0/src/sarvamai/types/files_upload_response.py +0 -25
- sarvamai-0.1.7a0/src/sarvamai/types/job_state.py +0 -5
- sarvamai-0.1.7a0/src/sarvamai/types/job_status_v_1.py +0 -80
- sarvamai-0.1.7a0/src/sarvamai/types/speech_to_text_job_parameters.py +0 -44
- sarvamai-0.1.7a0/src/sarvamai/types/storage_container_type.py +0 -5
- sarvamai-0.1.7a0/src/sarvamai/types/task_detail_v_1.py +0 -25
- sarvamai-0.1.7a0/src/sarvamai/types/task_file_details.py +0 -20
- sarvamai-0.1.7a0/src/sarvamai/types/task_state.py +0 -5
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/README.md +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/chat/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/chat/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/chat/raw_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/api_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/datetime_utils.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/events.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/file.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/force_multipart.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/http_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/http_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/jsonable_encoder.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/pydantic_utilities.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/query_encoder.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/remove_none_from_dict.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/request_options.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/core/serialization.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/environment.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/bad_request_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/forbidden_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/internal_server_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/too_many_requests_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/errors/unprocessable_entity_error.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/play.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/py.typed +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/audio_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/audio_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/chat_completion_request_assistant_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/chat_completion_request_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/chat_completion_request_system_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/chat_completion_request_user_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/chat_completion_response_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/choice.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/completion_usage.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/config_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/create_chat_completion_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/diarized_entry.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/diarized_transcript.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/error_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/error_details.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/error_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/events_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/language_identification_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_response_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_streaming_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_transcription_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_translate_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_translate_response_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_translate_streaming_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/speech_to_text_translate_transcription_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/stop_configuration.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/text_to_speech_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/timestamps_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/transcription_metrics.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/translation_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/requests/transliteration_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/raw_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/socket_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/types/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_high_vad_sensitivity.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_language_code.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_vad_signals.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/socket_client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/types/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_high_vad_sensitivity.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_vad_signals.py +0 -0
- {sarvamai-0.1.7a0/src/sarvamai/speech_to_text_job → sarvamai-0.1.8/src/sarvamai/text}/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/text/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/text/raw_client.py +0 -0
- {sarvamai-0.1.7a0/src/sarvamai/text → sarvamai-0.1.8/src/sarvamai/text_to_speech}/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/text_to_speech/client.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/text_to_speech/raw_client.py +0 -0
- {sarvamai-0.1.7a0/src/sarvamai/text_to_speech → sarvamai-0.1.8/src/sarvamai/text_to_speech_streaming}/__init__.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/audio_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/audio_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/chat_completion_request_assistant_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/chat_completion_request_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/chat_completion_request_system_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/chat_completion_request_user_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/chat_completion_response_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/choice.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/completion_usage.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/config_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/create_chat_completion_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/diarized_entry.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/diarized_transcript.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/error_code.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/error_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/error_details.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/error_message.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/events_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/finish_reason.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/format.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/language_identification_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/numerals_format.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/reasoning_effort.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/response_type.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/role.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/sarvam_model_ids.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_sample_rate.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_response_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_streaming_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_transcription_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_response_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_streaming_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/speech_to_text_translate_transcription_data.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/spoken_form_numerals_format.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/stop_configuration.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/text_to_speech_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/text_to_speech_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/text_to_speech_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/text_to_speech_speaker.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/timestamps_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/transcription_metrics.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translate_mode.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translate_model.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translate_source_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translate_speaker_gender.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translate_target_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translation_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/translatiterate_target_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/transliterate_mode.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/transliterate_source_language.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/types/transliteration_response.py +0 -0
- {sarvamai-0.1.7a0 → sarvamai-0.1.8}/src/sarvamai/version.py +0 -0
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
from .types import (
|
|
6
6
|
AudioData,
|
|
7
7
|
AudioMessage,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
BulkJobInitResponseV1,
|
|
8
|
+
AudioOutput,
|
|
9
|
+
AudioOutputData,
|
|
11
10
|
ChatCompletionRequestAssistantMessage,
|
|
12
11
|
ChatCompletionRequestMessage,
|
|
13
12
|
ChatCompletionRequestMessage_Assistant,
|
|
@@ -19,6 +18,11 @@ from .types import (
|
|
|
19
18
|
Choice,
|
|
20
19
|
CompletionUsage,
|
|
21
20
|
ConfigMessage,
|
|
21
|
+
ConfigureConnection,
|
|
22
|
+
ConfigureConnectionData,
|
|
23
|
+
ConfigureConnectionDataOutputAudioBitrate,
|
|
24
|
+
ConfigureConnectionDataSpeaker,
|
|
25
|
+
ConfigureConnectionDataTargetLanguageCode,
|
|
22
26
|
CreateChatCompletionResponse,
|
|
23
27
|
DiarizedEntry,
|
|
24
28
|
DiarizedTranscript,
|
|
@@ -26,23 +30,22 @@ from .types import (
|
|
|
26
30
|
ErrorData,
|
|
27
31
|
ErrorDetails,
|
|
28
32
|
ErrorMessage,
|
|
33
|
+
ErrorResponse,
|
|
34
|
+
ErrorResponseData,
|
|
29
35
|
EventsData,
|
|
30
|
-
FileSignedUrlDetails,
|
|
31
|
-
FilesDownloadResponse,
|
|
32
|
-
FilesRequest,
|
|
33
|
-
FilesUploadResponse,
|
|
34
36
|
FinishReason,
|
|
37
|
+
FlushSignal,
|
|
35
38
|
Format,
|
|
36
|
-
JobState,
|
|
37
|
-
JobStatusV1,
|
|
38
39
|
LanguageIdentificationResponse,
|
|
39
40
|
NumeralsFormat,
|
|
41
|
+
PingSignal,
|
|
40
42
|
ReasoningEffort,
|
|
41
43
|
ResponseType,
|
|
42
44
|
Role,
|
|
43
45
|
SarvamModelIds,
|
|
46
|
+
SendText,
|
|
47
|
+
SendTextData,
|
|
44
48
|
SpeechSampleRate,
|
|
45
|
-
SpeechToTextJobParameters,
|
|
46
49
|
SpeechToTextLanguage,
|
|
47
50
|
SpeechToTextModel,
|
|
48
51
|
SpeechToTextResponse,
|
|
@@ -57,10 +60,6 @@ from .types import (
|
|
|
57
60
|
SpeechToTextTranslateTranscriptionData,
|
|
58
61
|
SpokenFormNumeralsFormat,
|
|
59
62
|
StopConfiguration,
|
|
60
|
-
StorageContainerType,
|
|
61
|
-
TaskDetailV1,
|
|
62
|
-
TaskFileDetails,
|
|
63
|
-
TaskState,
|
|
64
63
|
TextToSpeechLanguage,
|
|
65
64
|
TextToSpeechModel,
|
|
66
65
|
TextToSpeechResponse,
|
|
@@ -89,20 +88,19 @@ from .errors import (
|
|
|
89
88
|
from . import (
|
|
90
89
|
chat,
|
|
91
90
|
speech_to_text,
|
|
92
|
-
speech_to_text_job,
|
|
93
91
|
speech_to_text_streaming,
|
|
94
92
|
speech_to_text_translate_streaming,
|
|
95
93
|
text,
|
|
96
94
|
text_to_speech,
|
|
95
|
+
text_to_speech_streaming,
|
|
97
96
|
)
|
|
98
97
|
from .client import AsyncSarvamAI, SarvamAI
|
|
99
98
|
from .environment import SarvamAIEnvironment
|
|
100
99
|
from .requests import (
|
|
101
100
|
AudioDataParams,
|
|
102
101
|
AudioMessageParams,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
BulkJobInitResponseV1Params,
|
|
102
|
+
AudioOutputDataParams,
|
|
103
|
+
AudioOutputParams,
|
|
106
104
|
ChatCompletionRequestAssistantMessageParams,
|
|
107
105
|
ChatCompletionRequestMessageParams,
|
|
108
106
|
ChatCompletionRequestMessage_AssistantParams,
|
|
@@ -114,20 +112,22 @@ from .requests import (
|
|
|
114
112
|
ChoiceParams,
|
|
115
113
|
CompletionUsageParams,
|
|
116
114
|
ConfigMessageParams,
|
|
115
|
+
ConfigureConnectionDataParams,
|
|
116
|
+
ConfigureConnectionParams,
|
|
117
117
|
CreateChatCompletionResponseParams,
|
|
118
118
|
DiarizedEntryParams,
|
|
119
119
|
DiarizedTranscriptParams,
|
|
120
120
|
ErrorDataParams,
|
|
121
121
|
ErrorDetailsParams,
|
|
122
122
|
ErrorMessageParams,
|
|
123
|
+
ErrorResponseDataParams,
|
|
124
|
+
ErrorResponseParams,
|
|
123
125
|
EventsDataParams,
|
|
124
|
-
|
|
125
|
-
FilesDownloadResponseParams,
|
|
126
|
-
FilesRequestParams,
|
|
127
|
-
FilesUploadResponseParams,
|
|
128
|
-
JobStatusV1Params,
|
|
126
|
+
FlushSignalParams,
|
|
129
127
|
LanguageIdentificationResponseParams,
|
|
130
|
-
|
|
128
|
+
PingSignalParams,
|
|
129
|
+
SendTextDataParams,
|
|
130
|
+
SendTextParams,
|
|
131
131
|
SpeechToTextResponseDataParams,
|
|
132
132
|
SpeechToTextResponseParams,
|
|
133
133
|
SpeechToTextStreamingResponseParams,
|
|
@@ -137,8 +137,6 @@ from .requests import (
|
|
|
137
137
|
SpeechToTextTranslateStreamingResponseParams,
|
|
138
138
|
SpeechToTextTranslateTranscriptionDataParams,
|
|
139
139
|
StopConfigurationParams,
|
|
140
|
-
TaskDetailV1Params,
|
|
141
|
-
TaskFileDetailsParams,
|
|
142
140
|
TextToSpeechResponseParams,
|
|
143
141
|
TimestampsModelParams,
|
|
144
142
|
TranscriptionMetricsParams,
|
|
@@ -164,13 +162,11 @@ __all__ = [
|
|
|
164
162
|
"AudioDataParams",
|
|
165
163
|
"AudioMessage",
|
|
166
164
|
"AudioMessageParams",
|
|
165
|
+
"AudioOutput",
|
|
166
|
+
"AudioOutputData",
|
|
167
|
+
"AudioOutputDataParams",
|
|
168
|
+
"AudioOutputParams",
|
|
167
169
|
"BadRequestError",
|
|
168
|
-
"BaseJobParameters",
|
|
169
|
-
"BaseJobParametersParams",
|
|
170
|
-
"BulkJobCallback",
|
|
171
|
-
"BulkJobCallbackParams",
|
|
172
|
-
"BulkJobInitResponseV1",
|
|
173
|
-
"BulkJobInitResponseV1Params",
|
|
174
170
|
"ChatCompletionRequestAssistantMessage",
|
|
175
171
|
"ChatCompletionRequestAssistantMessageParams",
|
|
176
172
|
"ChatCompletionRequestMessage",
|
|
@@ -193,6 +189,13 @@ __all__ = [
|
|
|
193
189
|
"CompletionUsageParams",
|
|
194
190
|
"ConfigMessage",
|
|
195
191
|
"ConfigMessageParams",
|
|
192
|
+
"ConfigureConnection",
|
|
193
|
+
"ConfigureConnectionData",
|
|
194
|
+
"ConfigureConnectionDataOutputAudioBitrate",
|
|
195
|
+
"ConfigureConnectionDataParams",
|
|
196
|
+
"ConfigureConnectionDataSpeaker",
|
|
197
|
+
"ConfigureConnectionDataTargetLanguageCode",
|
|
198
|
+
"ConfigureConnectionParams",
|
|
196
199
|
"CreateChatCompletionResponse",
|
|
197
200
|
"CreateChatCompletionResponseParams",
|
|
198
201
|
"DiarizedEntry",
|
|
@@ -206,36 +209,35 @@ __all__ = [
|
|
|
206
209
|
"ErrorDetailsParams",
|
|
207
210
|
"ErrorMessage",
|
|
208
211
|
"ErrorMessageParams",
|
|
212
|
+
"ErrorResponse",
|
|
213
|
+
"ErrorResponseData",
|
|
214
|
+
"ErrorResponseDataParams",
|
|
215
|
+
"ErrorResponseParams",
|
|
209
216
|
"EventsData",
|
|
210
217
|
"EventsDataParams",
|
|
211
|
-
"FileSignedUrlDetails",
|
|
212
|
-
"FileSignedUrlDetailsParams",
|
|
213
|
-
"FilesDownloadResponse",
|
|
214
|
-
"FilesDownloadResponseParams",
|
|
215
|
-
"FilesRequest",
|
|
216
|
-
"FilesRequestParams",
|
|
217
|
-
"FilesUploadResponse",
|
|
218
|
-
"FilesUploadResponseParams",
|
|
219
218
|
"FinishReason",
|
|
219
|
+
"FlushSignal",
|
|
220
|
+
"FlushSignalParams",
|
|
220
221
|
"ForbiddenError",
|
|
221
222
|
"Format",
|
|
222
223
|
"InternalServerError",
|
|
223
|
-
"JobState",
|
|
224
|
-
"JobStatusV1",
|
|
225
|
-
"JobStatusV1Params",
|
|
226
224
|
"LanguageIdentificationResponse",
|
|
227
225
|
"LanguageIdentificationResponseParams",
|
|
228
226
|
"NumeralsFormat",
|
|
227
|
+
"PingSignal",
|
|
228
|
+
"PingSignalParams",
|
|
229
229
|
"ReasoningEffort",
|
|
230
230
|
"ResponseType",
|
|
231
231
|
"Role",
|
|
232
232
|
"SarvamAI",
|
|
233
233
|
"SarvamAIEnvironment",
|
|
234
234
|
"SarvamModelIds",
|
|
235
|
+
"SendText",
|
|
236
|
+
"SendTextData",
|
|
237
|
+
"SendTextDataParams",
|
|
238
|
+
"SendTextParams",
|
|
235
239
|
"ServiceUnavailableError",
|
|
236
240
|
"SpeechSampleRate",
|
|
237
|
-
"SpeechToTextJobParameters",
|
|
238
|
-
"SpeechToTextJobParametersParams",
|
|
239
241
|
"SpeechToTextLanguage",
|
|
240
242
|
"SpeechToTextModel",
|
|
241
243
|
"SpeechToTextResponse",
|
|
@@ -266,12 +268,6 @@ __all__ = [
|
|
|
266
268
|
"SpokenFormNumeralsFormat",
|
|
267
269
|
"StopConfiguration",
|
|
268
270
|
"StopConfigurationParams",
|
|
269
|
-
"StorageContainerType",
|
|
270
|
-
"TaskDetailV1",
|
|
271
|
-
"TaskDetailV1Params",
|
|
272
|
-
"TaskFileDetails",
|
|
273
|
-
"TaskFileDetailsParams",
|
|
274
|
-
"TaskState",
|
|
275
271
|
"TextToSpeechLanguage",
|
|
276
272
|
"TextToSpeechModel",
|
|
277
273
|
"TextToSpeechResponse",
|
|
@@ -298,9 +294,9 @@ __all__ = [
|
|
|
298
294
|
"__version__",
|
|
299
295
|
"chat",
|
|
300
296
|
"speech_to_text",
|
|
301
|
-
"speech_to_text_job",
|
|
302
297
|
"speech_to_text_streaming",
|
|
303
298
|
"speech_to_text_translate_streaming",
|
|
304
299
|
"text",
|
|
305
300
|
"text_to_speech",
|
|
301
|
+
"text_to_speech_streaming",
|
|
306
302
|
]
|
|
@@ -9,7 +9,6 @@ from .core.api_error import ApiError
|
|
|
9
9
|
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
10
10
|
from .environment import SarvamAIEnvironment
|
|
11
11
|
from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient
|
|
12
|
-
from .speech_to_text_job.client import AsyncSpeechToTextJobClient, SpeechToTextJobClient
|
|
13
12
|
from .speech_to_text_streaming.client import AsyncSpeechToTextStreamingClient, SpeechToTextStreamingClient
|
|
14
13
|
from .speech_to_text_translate_streaming.client import (
|
|
15
14
|
AsyncSpeechToTextTranslateStreamingClient,
|
|
@@ -17,6 +16,7 @@ from .speech_to_text_translate_streaming.client import (
|
|
|
17
16
|
)
|
|
18
17
|
from .text.client import AsyncTextClient, TextClient
|
|
19
18
|
from .text_to_speech.client import AsyncTextToSpeechClient, TextToSpeechClient
|
|
19
|
+
from .text_to_speech_streaming.client import AsyncTextToSpeechStreamingClient, TextToSpeechStreamingClient
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class SarvamAI:
|
|
@@ -83,11 +83,11 @@ class SarvamAI:
|
|
|
83
83
|
self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper)
|
|
84
84
|
self.text_to_speech = TextToSpeechClient(client_wrapper=self._client_wrapper)
|
|
85
85
|
self.chat = ChatClient(client_wrapper=self._client_wrapper)
|
|
86
|
-
self.speech_to_text_job = SpeechToTextJobClient(client_wrapper=self._client_wrapper)
|
|
87
86
|
self.speech_to_text_streaming = SpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
|
|
88
87
|
self.speech_to_text_translate_streaming = SpeechToTextTranslateStreamingClient(
|
|
89
88
|
client_wrapper=self._client_wrapper
|
|
90
89
|
)
|
|
90
|
+
self.text_to_speech_streaming = TextToSpeechStreamingClient(client_wrapper=self._client_wrapper)
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
class AsyncSarvamAI:
|
|
@@ -154,8 +154,8 @@ class AsyncSarvamAI:
|
|
|
154
154
|
self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper)
|
|
155
155
|
self.text_to_speech = AsyncTextToSpeechClient(client_wrapper=self._client_wrapper)
|
|
156
156
|
self.chat = AsyncChatClient(client_wrapper=self._client_wrapper)
|
|
157
|
-
self.speech_to_text_job = AsyncSpeechToTextJobClient(client_wrapper=self._client_wrapper)
|
|
158
157
|
self.speech_to_text_streaming = AsyncSpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
|
|
159
158
|
self.speech_to_text_translate_streaming = AsyncSpeechToTextTranslateStreamingClient(
|
|
160
159
|
client_wrapper=self._client_wrapper
|
|
161
160
|
)
|
|
161
|
+
self.text_to_speech_streaming = AsyncTextToSpeechStreamingClient(client_wrapper=self._client_wrapper)
|
|
@@ -17,10 +17,10 @@ class BaseClientWrapper:
|
|
|
17
17
|
|
|
18
18
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
19
19
|
headers: typing.Dict[str, str] = {
|
|
20
|
-
"User-Agent": "sarvamai/0.1.
|
|
20
|
+
"User-Agent": "sarvamai/0.1.8",
|
|
21
21
|
"X-Fern-Language": "Python",
|
|
22
22
|
"X-Fern-SDK-Name": "sarvamai",
|
|
23
|
-
"X-Fern-SDK-Version": "0.1.
|
|
23
|
+
"X-Fern-SDK-Version": "0.1.8",
|
|
24
24
|
}
|
|
25
25
|
headers["api-subscription-key"] = self.api_subscription_key
|
|
26
26
|
return headers
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
5
|
from ..core.api_error import ApiError
|
|
6
|
+
from ..types.error_message import ErrorMessage
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
class ServiceUnavailableError(ApiError):
|
|
9
|
-
def __init__(self, body:
|
|
10
|
+
def __init__(self, body: ErrorMessage, headers: typing.Optional[typing.Dict[str, str]] = None):
|
|
10
11
|
super().__init__(status_code=503, headers=headers, body=body)
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
from .audio_data import AudioDataParams
|
|
6
6
|
from .audio_message import AudioMessageParams
|
|
7
|
-
from .
|
|
8
|
-
from .
|
|
9
|
-
from .bulk_job_init_response_v_1 import BulkJobInitResponseV1Params
|
|
7
|
+
from .audio_output import AudioOutputParams
|
|
8
|
+
from .audio_output_data import AudioOutputDataParams
|
|
10
9
|
from .chat_completion_request_assistant_message import ChatCompletionRequestAssistantMessageParams
|
|
11
10
|
from .chat_completion_request_message import (
|
|
12
11
|
ChatCompletionRequestMessageParams,
|
|
@@ -20,20 +19,22 @@ from .chat_completion_response_message import ChatCompletionResponseMessageParam
|
|
|
20
19
|
from .choice import ChoiceParams
|
|
21
20
|
from .completion_usage import CompletionUsageParams
|
|
22
21
|
from .config_message import ConfigMessageParams
|
|
22
|
+
from .configure_connection import ConfigureConnectionParams
|
|
23
|
+
from .configure_connection_data import ConfigureConnectionDataParams
|
|
23
24
|
from .create_chat_completion_response import CreateChatCompletionResponseParams
|
|
24
25
|
from .diarized_entry import DiarizedEntryParams
|
|
25
26
|
from .diarized_transcript import DiarizedTranscriptParams
|
|
26
27
|
from .error_data import ErrorDataParams
|
|
27
28
|
from .error_details import ErrorDetailsParams
|
|
28
29
|
from .error_message import ErrorMessageParams
|
|
30
|
+
from .error_response import ErrorResponseParams
|
|
31
|
+
from .error_response_data import ErrorResponseDataParams
|
|
29
32
|
from .events_data import EventsDataParams
|
|
30
|
-
from .
|
|
31
|
-
from .files_download_response import FilesDownloadResponseParams
|
|
32
|
-
from .files_request import FilesRequestParams
|
|
33
|
-
from .files_upload_response import FilesUploadResponseParams
|
|
34
|
-
from .job_status_v_1 import JobStatusV1Params
|
|
33
|
+
from .flush_signal import FlushSignalParams
|
|
35
34
|
from .language_identification_response import LanguageIdentificationResponseParams
|
|
36
|
-
from .
|
|
35
|
+
from .ping_signal import PingSignalParams
|
|
36
|
+
from .send_text import SendTextParams
|
|
37
|
+
from .send_text_data import SendTextDataParams
|
|
37
38
|
from .speech_to_text_response import SpeechToTextResponseParams
|
|
38
39
|
from .speech_to_text_response_data import SpeechToTextResponseDataParams
|
|
39
40
|
from .speech_to_text_streaming_response import SpeechToTextStreamingResponseParams
|
|
@@ -43,8 +44,6 @@ from .speech_to_text_translate_response_data import SpeechToTextTranslateRespons
|
|
|
43
44
|
from .speech_to_text_translate_streaming_response import SpeechToTextTranslateStreamingResponseParams
|
|
44
45
|
from .speech_to_text_translate_transcription_data import SpeechToTextTranslateTranscriptionDataParams
|
|
45
46
|
from .stop_configuration import StopConfigurationParams
|
|
46
|
-
from .task_detail_v_1 import TaskDetailV1Params
|
|
47
|
-
from .task_file_details import TaskFileDetailsParams
|
|
48
47
|
from .text_to_speech_response import TextToSpeechResponseParams
|
|
49
48
|
from .timestamps_model import TimestampsModelParams
|
|
50
49
|
from .transcription_metrics import TranscriptionMetricsParams
|
|
@@ -54,9 +53,8 @@ from .transliteration_response import TransliterationResponseParams
|
|
|
54
53
|
__all__ = [
|
|
55
54
|
"AudioDataParams",
|
|
56
55
|
"AudioMessageParams",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"BulkJobInitResponseV1Params",
|
|
56
|
+
"AudioOutputDataParams",
|
|
57
|
+
"AudioOutputParams",
|
|
60
58
|
"ChatCompletionRequestAssistantMessageParams",
|
|
61
59
|
"ChatCompletionRequestMessageParams",
|
|
62
60
|
"ChatCompletionRequestMessage_AssistantParams",
|
|
@@ -68,20 +66,22 @@ __all__ = [
|
|
|
68
66
|
"ChoiceParams",
|
|
69
67
|
"CompletionUsageParams",
|
|
70
68
|
"ConfigMessageParams",
|
|
69
|
+
"ConfigureConnectionDataParams",
|
|
70
|
+
"ConfigureConnectionParams",
|
|
71
71
|
"CreateChatCompletionResponseParams",
|
|
72
72
|
"DiarizedEntryParams",
|
|
73
73
|
"DiarizedTranscriptParams",
|
|
74
74
|
"ErrorDataParams",
|
|
75
75
|
"ErrorDetailsParams",
|
|
76
76
|
"ErrorMessageParams",
|
|
77
|
+
"ErrorResponseDataParams",
|
|
78
|
+
"ErrorResponseParams",
|
|
77
79
|
"EventsDataParams",
|
|
78
|
-
"
|
|
79
|
-
"FilesDownloadResponseParams",
|
|
80
|
-
"FilesRequestParams",
|
|
81
|
-
"FilesUploadResponseParams",
|
|
82
|
-
"JobStatusV1Params",
|
|
80
|
+
"FlushSignalParams",
|
|
83
81
|
"LanguageIdentificationResponseParams",
|
|
84
|
-
"
|
|
82
|
+
"PingSignalParams",
|
|
83
|
+
"SendTextDataParams",
|
|
84
|
+
"SendTextParams",
|
|
85
85
|
"SpeechToTextResponseDataParams",
|
|
86
86
|
"SpeechToTextResponseParams",
|
|
87
87
|
"SpeechToTextStreamingResponseParams",
|
|
@@ -91,8 +91,6 @@ __all__ = [
|
|
|
91
91
|
"SpeechToTextTranslateStreamingResponseParams",
|
|
92
92
|
"SpeechToTextTranslateTranscriptionDataParams",
|
|
93
93
|
"StopConfigurationParams",
|
|
94
|
-
"TaskDetailV1Params",
|
|
95
|
-
"TaskFileDetailsParams",
|
|
96
94
|
"TextToSpeechResponseParams",
|
|
97
95
|
"TimestampsModelParams",
|
|
98
96
|
"TranscriptionMetricsParams",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from .audio_output_data import AudioOutputDataParams
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AudioOutputParams(typing_extensions.TypedDict):
|
|
10
|
+
type: typing.Literal["audio"]
|
|
11
|
+
data: AudioOutputDataParams
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing_extensions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AudioOutputDataParams(typing_extensions.TypedDict):
|
|
7
|
+
content_type: str
|
|
8
|
+
"""
|
|
9
|
+
MIME type of the audio content (e.g., 'audio/mp3', 'audio/wav')
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
audio: str
|
|
13
|
+
"""
|
|
14
|
+
Base64-encoded audio data ready for playback or download
|
|
15
|
+
"""
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from .configure_connection_data import ConfigureConnectionDataParams
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ConfigureConnectionParams(typing_extensions.TypedDict):
|
|
10
|
+
"""
|
|
11
|
+
Configuration message required as the first message after establishing the WebSocket connection.
|
|
12
|
+
This initializes TTS parameters and can be updated at any time during the WebSocket lifecycle
|
|
13
|
+
by sending a new config message. When a config update is sent, any text currently in the buffer
|
|
14
|
+
will be automatically flushed and processed before applying the new configuration.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
type: typing.Literal["config"]
|
|
18
|
+
data: ConfigureConnectionDataParams
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.configure_connection_data_output_audio_bitrate import ConfigureConnectionDataOutputAudioBitrate
|
|
7
|
+
from ..types.configure_connection_data_speaker import ConfigureConnectionDataSpeaker
|
|
8
|
+
from ..types.configure_connection_data_target_language_code import ConfigureConnectionDataTargetLanguageCode
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ConfigureConnectionDataParams(typing_extensions.TypedDict):
|
|
12
|
+
target_language_code: ConfigureConnectionDataTargetLanguageCode
|
|
13
|
+
"""
|
|
14
|
+
The language of the text is BCP-47 format
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
speaker: ConfigureConnectionDataSpeaker
|
|
18
|
+
"""
|
|
19
|
+
The speaker voice to be used for the output audio.
|
|
20
|
+
|
|
21
|
+
**Default:** Anushka
|
|
22
|
+
|
|
23
|
+
**Model Compatibility (Speakers compatible with respective model):**
|
|
24
|
+
- **bulbul:v2:**
|
|
25
|
+
- Female: Anushka, Manisha, Vidya, Arya
|
|
26
|
+
- Male: Abhilash, Karun, Hitesh
|
|
27
|
+
|
|
28
|
+
**Note:** Speaker selection must match the chosen model version.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
pitch: typing_extensions.NotRequired[float]
|
|
32
|
+
"""
|
|
33
|
+
Controls the pitch of the audio. Lower values result in a deeper voice,
|
|
34
|
+
while higher values make it sharper. The suitable range is between -0.75
|
|
35
|
+
and 0.75. Default is 0.0.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
pace: typing_extensions.NotRequired[float]
|
|
39
|
+
"""
|
|
40
|
+
Controls the speed of the audio. Lower values result in slower speech,
|
|
41
|
+
while higher values make it faster. The suitable range is between 0.5
|
|
42
|
+
and 2.0. Default is 1.0.
|
|
43
|
+
"""
|
|
44
|
+
|
|
45
|
+
loudness: typing_extensions.NotRequired[float]
|
|
46
|
+
"""
|
|
47
|
+
Controls the loudness of the audio. Lower values result in quieter audio,
|
|
48
|
+
while higher values make it louder. The suitable range is between 0.3
|
|
49
|
+
and 3.0. Default is 1.0.
|
|
50
|
+
"""
|
|
51
|
+
|
|
52
|
+
speech_sample_rate: typing_extensions.NotRequired[int]
|
|
53
|
+
"""
|
|
54
|
+
Specifies the sample rate of the output audio. Supported values are
|
|
55
|
+
8000, 16000, 22050, 24000 Hz. If not provided, the default is 22050 Hz.
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
enable_preprocessing: typing_extensions.NotRequired[bool]
|
|
59
|
+
"""
|
|
60
|
+
Controls whether normalization of English words and numeric entities
|
|
61
|
+
(e.g., numbers, dates) is performed. Set to true for better handling
|
|
62
|
+
of mixed-language text. Default is false.
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
output_audio_codec: typing_extensions.NotRequired[typing.Literal["mp3"]]
|
|
66
|
+
"""
|
|
67
|
+
Audio codec (currently supports MP3 only, optimized for real-time playback)
|
|
68
|
+
"""
|
|
69
|
+
|
|
70
|
+
output_audio_bitrate: typing_extensions.NotRequired[ConfigureConnectionDataOutputAudioBitrate]
|
|
71
|
+
"""
|
|
72
|
+
Audio bitrate (choose from 5 supported bitrate options)
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
min_buffer_size: typing_extensions.NotRequired[int]
|
|
76
|
+
"""
|
|
77
|
+
Minimum character length that triggers buffer flushing for TTS model processing
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
max_chunk_length: typing_extensions.NotRequired[int]
|
|
81
|
+
"""
|
|
82
|
+
Maximum length for sentence splitting (adjust based on content length)
|
|
83
|
+
"""
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from .error_response_data import ErrorResponseDataParams
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ErrorResponseParams(typing_extensions.TypedDict):
|
|
10
|
+
type: typing.Literal["error"]
|
|
11
|
+
data: ErrorResponseDataParams
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class ErrorResponseDataParams(typing_extensions.TypedDict):
|
|
9
|
+
message: str
|
|
10
|
+
code: typing_extensions.NotRequired[int]
|
|
11
|
+
"""
|
|
12
|
+
Optional error code for programmatic error handling
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
details: typing_extensions.NotRequired[typing.Dict[str, typing.Optional[typing.Any]]]
|
|
16
|
+
"""
|
|
17
|
+
Additional error details and context information
|
|
18
|
+
"""
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FlushSignalParams(typing_extensions.TypedDict):
|
|
9
|
+
"""
|
|
10
|
+
Forces the text buffer to process immediately, regardless of the min_buffer_size threshold.
|
|
11
|
+
Use this when you need to process remaining text that hasn't reached the minimum buffer size.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
type: typing.Literal["flush"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PingSignalParams(typing_extensions.TypedDict):
|
|
9
|
+
"""
|
|
10
|
+
Send ping signal to keep the WebSocket connection alive. The connection automatically
|
|
11
|
+
closes after one minute of inactivity.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
type: typing.Literal["ping"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from .send_text_data import SendTextDataParams
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class SendTextParams(typing_extensions.TypedDict):
|
|
10
|
+
type: typing.Literal["text"]
|
|
11
|
+
data: SendTextDataParams
|