sarvamai 0.1.20a0__tar.gz → 0.1.20a2__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.20a0 → sarvamai-0.1.20a2}/PKG-INFO +1 -1
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/pyproject.toml +1 -1
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/__init__.py +20 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/client_wrapper.py +2 -2
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/__init__.py +4 -0
- sarvamai-0.1.20a2/src/sarvamai/requests/audio_data.py +34 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/audio_output_data.py +0 -5
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/error_response_data.py +0 -5
- sarvamai-0.1.20a2/src/sarvamai/requests/event_response.py +19 -0
- sarvamai-0.1.20a2/src/sarvamai/requests/event_response_data.py +23 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/__init__.py +2 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/client.py +25 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/raw_client.py +25 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/__init__.py +2 -0
- sarvamai-0.1.20a2/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +33 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/__init__.py +2 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/client.py +25 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/raw_client.py +25 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/types/__init__.py +2 -0
- sarvamai-0.1.20a2/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +33 -0
- sarvamai-0.1.20a2/src/sarvamai/text_to_speech_streaming/__init__.py +7 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech_streaming/client.py +13 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech_streaming/raw_client.py +13 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech_streaming/socket_client.py +2 -1
- sarvamai-0.1.20a2/src/sarvamai/text_to_speech_streaming/types/__init__.py +7 -0
- sarvamai-0.1.20a2/src/sarvamai/text_to_speech_streaming/types/text_to_speech_streaming_send_completion_event.py +5 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/__init__.py +10 -0
- sarvamai-0.1.20a2/src/sarvamai/types/audio_data.py +44 -0
- sarvamai-0.1.20a2/src/sarvamai/types/audio_data_input_audio_codec.py +33 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/audio_output_data.py +0 -5
- sarvamai-0.1.20a2/src/sarvamai/types/completion_event_flag.py +5 -0
- sarvamai-0.1.20a2/src/sarvamai/types/connection_sample_rate.py +3 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_response_data.py +0 -5
- sarvamai-0.1.20a2/src/sarvamai/types/event_response.py +29 -0
- sarvamai-0.1.20a0/src/sarvamai/types/audio_data.py → sarvamai-0.1.20a2/src/sarvamai/types/event_response_data.py +8 -7
- sarvamai-0.1.20a0/src/sarvamai/requests/audio_data.py +0 -22
- sarvamai-0.1.20a0/src/sarvamai/text_to_speech_streaming/__init__.py +0 -4
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/README.md +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/chat/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/chat/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/chat/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/api_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/datetime_utils.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/events.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/file.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/force_multipart.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/http_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/http_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/jsonable_encoder.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/pydantic_utilities.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/query_encoder.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/remove_none_from_dict.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/request_options.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/core/serialization.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/environment.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/bad_request_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/forbidden_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/internal_server_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/service_unavailable_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/too_many_requests_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/errors/unprocessable_entity_error.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/play.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/py.typed +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/audio_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/audio_output.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/base_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/bulk_job_callback.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/bulk_job_init_response_v_1.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/chat_completion_request_assistant_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/chat_completion_request_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/chat_completion_request_system_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/chat_completion_request_user_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/chat_completion_response_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/choice.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/completion_usage.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/config_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/configure_connection.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/configure_connection_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/create_chat_completion_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/diarized_entry.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/diarized_transcript.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/error_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/error_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/error_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/error_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/events_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/file_signed_url_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/files_download_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/files_request.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/files_upload_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/job_status_v_1_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/language_identification_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/ping_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/send_text.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/send_text_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_response_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_streaming_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_transcription_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_translate_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_translate_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_translate_response_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_translate_streaming_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/speech_to_text_translate_transcription_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/stop_configuration.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/stt_flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/task_detail_v_1.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/task_file_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/text_to_speech_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/timestamps_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/transcription_metrics.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/translation_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/requests/transliteration_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_job/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_job/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_job/job.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_job/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/socket_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_high_vad_sensitivity.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_language_code.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_vad_signals.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_job/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_job/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_job/job.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_job/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/socket_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_high_vad_sensitivity.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_vad_signals.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech/__init__.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech/client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/text_to_speech/raw_client.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/audio_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/audio_output.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/base_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/bulk_job_callback.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/bulk_job_init_response_v_1.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/chat_completion_request_assistant_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/chat_completion_request_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/chat_completion_request_system_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/chat_completion_request_user_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/chat_completion_response_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/choice.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/completion_usage.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/config_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection_data_output_audio_bitrate.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection_data_output_audio_codec.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection_data_speaker.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/configure_connection_data_target_language_code.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/create_chat_completion_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/diarized_entry.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/diarized_transcript.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_code.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_message.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/error_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/events_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/events_data_signal_type.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/file_signed_url_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/files_download_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/files_request.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/files_upload_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/finish_reason.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/input_audio_codec.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/job_state.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/job_status_v_1_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/language_identification_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/numerals_format.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/ping_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/reasoning_effort.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/response_type.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/role.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/sarvam_model_ids.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/send_text.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/send_text_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_sample_rate.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_response_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_streaming_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_transcription_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_job_parameters.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_response_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_streaming_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/speech_to_text_translate_transcription_data.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/spoken_form_numerals_format.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/stop_configuration.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/storage_container_type.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/stt_flush_signal.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/task_detail_v_1.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/task_file_details.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/task_state.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/text_to_speech_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/text_to_speech_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/text_to_speech_output_audio_codec.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/text_to_speech_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/text_to_speech_speaker.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/timestamps_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/transcription_metrics.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translate_mode.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translate_model.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translate_source_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translate_speaker_gender.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translate_target_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translation_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/translatiterate_target_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/transliterate_mode.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/transliterate_source_language.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/types/transliteration_response.py +0 -0
- {sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/version.py +0 -0
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
from .types import (
|
|
6
6
|
AudioData,
|
|
7
|
+
AudioDataInputAudioCodec,
|
|
7
8
|
AudioMessage,
|
|
8
9
|
AudioOutput,
|
|
9
10
|
AudioOutputData,
|
|
@@ -19,6 +20,7 @@ from .types import (
|
|
|
19
20
|
ChatCompletionRequestUserMessage,
|
|
20
21
|
ChatCompletionResponseMessage,
|
|
21
22
|
Choice,
|
|
23
|
+
CompletionEventFlag,
|
|
22
24
|
CompletionUsage,
|
|
23
25
|
ConfigMessage,
|
|
24
26
|
ConfigureConnection,
|
|
@@ -27,6 +29,7 @@ from .types import (
|
|
|
27
29
|
ConfigureConnectionDataOutputAudioCodec,
|
|
28
30
|
ConfigureConnectionDataSpeaker,
|
|
29
31
|
ConfigureConnectionDataTargetLanguageCode,
|
|
32
|
+
ConnectionSampleRate,
|
|
30
33
|
CreateChatCompletionResponse,
|
|
31
34
|
DiarizedEntry,
|
|
32
35
|
DiarizedTranscript,
|
|
@@ -36,6 +39,8 @@ from .types import (
|
|
|
36
39
|
ErrorMessage,
|
|
37
40
|
ErrorResponse,
|
|
38
41
|
ErrorResponseData,
|
|
42
|
+
EventResponse,
|
|
43
|
+
EventResponseData,
|
|
39
44
|
EventsData,
|
|
40
45
|
EventsDataSignalType,
|
|
41
46
|
FileSignedUrlDetails,
|
|
@@ -146,6 +151,8 @@ from .requests import (
|
|
|
146
151
|
ErrorMessageParams,
|
|
147
152
|
ErrorResponseDataParams,
|
|
148
153
|
ErrorResponseParams,
|
|
154
|
+
EventResponseDataParams,
|
|
155
|
+
EventResponseParams,
|
|
149
156
|
EventsDataParams,
|
|
150
157
|
FileSignedUrlDetailsParams,
|
|
151
158
|
FilesDownloadResponseParams,
|
|
@@ -180,6 +187,7 @@ from .requests import (
|
|
|
180
187
|
from .speech_to_text_streaming import (
|
|
181
188
|
SpeechToTextStreamingFlushSignal,
|
|
182
189
|
SpeechToTextStreamingHighVadSensitivity,
|
|
190
|
+
SpeechToTextStreamingInputAudioCodec,
|
|
183
191
|
SpeechToTextStreamingLanguageCode,
|
|
184
192
|
SpeechToTextStreamingModel,
|
|
185
193
|
SpeechToTextStreamingVadSignals,
|
|
@@ -187,14 +195,17 @@ from .speech_to_text_streaming import (
|
|
|
187
195
|
from .speech_to_text_translate_streaming import (
|
|
188
196
|
SpeechToTextTranslateStreamingFlushSignal,
|
|
189
197
|
SpeechToTextTranslateStreamingHighVadSensitivity,
|
|
198
|
+
SpeechToTextTranslateStreamingInputAudioCodec,
|
|
190
199
|
SpeechToTextTranslateStreamingModel,
|
|
191
200
|
SpeechToTextTranslateStreamingVadSignals,
|
|
192
201
|
)
|
|
202
|
+
from .text_to_speech_streaming import TextToSpeechStreamingSendCompletionEvent
|
|
193
203
|
from .version import __version__
|
|
194
204
|
|
|
195
205
|
__all__ = [
|
|
196
206
|
"AsyncSarvamAI",
|
|
197
207
|
"AudioData",
|
|
208
|
+
"AudioDataInputAudioCodec",
|
|
198
209
|
"AudioDataParams",
|
|
199
210
|
"AudioMessage",
|
|
200
211
|
"AudioMessageParams",
|
|
@@ -227,6 +238,7 @@ __all__ = [
|
|
|
227
238
|
"ChatCompletionResponseMessageParams",
|
|
228
239
|
"Choice",
|
|
229
240
|
"ChoiceParams",
|
|
241
|
+
"CompletionEventFlag",
|
|
230
242
|
"CompletionUsage",
|
|
231
243
|
"CompletionUsageParams",
|
|
232
244
|
"ConfigMessage",
|
|
@@ -239,6 +251,7 @@ __all__ = [
|
|
|
239
251
|
"ConfigureConnectionDataSpeaker",
|
|
240
252
|
"ConfigureConnectionDataTargetLanguageCode",
|
|
241
253
|
"ConfigureConnectionParams",
|
|
254
|
+
"ConnectionSampleRate",
|
|
242
255
|
"CreateChatCompletionResponse",
|
|
243
256
|
"CreateChatCompletionResponseParams",
|
|
244
257
|
"DiarizedEntry",
|
|
@@ -256,6 +269,10 @@ __all__ = [
|
|
|
256
269
|
"ErrorResponseData",
|
|
257
270
|
"ErrorResponseDataParams",
|
|
258
271
|
"ErrorResponseParams",
|
|
272
|
+
"EventResponse",
|
|
273
|
+
"EventResponseData",
|
|
274
|
+
"EventResponseDataParams",
|
|
275
|
+
"EventResponseParams",
|
|
259
276
|
"EventsData",
|
|
260
277
|
"EventsDataParams",
|
|
261
278
|
"EventsDataSignalType",
|
|
@@ -303,6 +320,7 @@ __all__ = [
|
|
|
303
320
|
"SpeechToTextResponseParams",
|
|
304
321
|
"SpeechToTextStreamingFlushSignal",
|
|
305
322
|
"SpeechToTextStreamingHighVadSensitivity",
|
|
323
|
+
"SpeechToTextStreamingInputAudioCodec",
|
|
306
324
|
"SpeechToTextStreamingLanguageCode",
|
|
307
325
|
"SpeechToTextStreamingModel",
|
|
308
326
|
"SpeechToTextStreamingResponse",
|
|
@@ -320,6 +338,7 @@ __all__ = [
|
|
|
320
338
|
"SpeechToTextTranslateResponseParams",
|
|
321
339
|
"SpeechToTextTranslateStreamingFlushSignal",
|
|
322
340
|
"SpeechToTextTranslateStreamingHighVadSensitivity",
|
|
341
|
+
"SpeechToTextTranslateStreamingInputAudioCodec",
|
|
323
342
|
"SpeechToTextTranslateStreamingModel",
|
|
324
343
|
"SpeechToTextTranslateStreamingResponse",
|
|
325
344
|
"SpeechToTextTranslateStreamingResponseParams",
|
|
@@ -343,6 +362,7 @@ __all__ = [
|
|
|
343
362
|
"TextToSpeechResponse",
|
|
344
363
|
"TextToSpeechResponseParams",
|
|
345
364
|
"TextToSpeechSpeaker",
|
|
365
|
+
"TextToSpeechStreamingSendCompletionEvent",
|
|
346
366
|
"TimestampsModel",
|
|
347
367
|
"TimestampsModelParams",
|
|
348
368
|
"TooManyRequestsError",
|
|
@@ -23,10 +23,10 @@ class BaseClientWrapper:
|
|
|
23
23
|
|
|
24
24
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
25
25
|
headers: typing.Dict[str, str] = {
|
|
26
|
-
"User-Agent": "sarvamai/0.1.
|
|
26
|
+
"User-Agent": "sarvamai/0.1.20a2",
|
|
27
27
|
"X-Fern-Language": "Python",
|
|
28
28
|
"X-Fern-SDK-Name": "sarvamai",
|
|
29
|
-
"X-Fern-SDK-Version": "0.1.
|
|
29
|
+
"X-Fern-SDK-Version": "0.1.20a2",
|
|
30
30
|
**(self.get_custom_headers() or {}),
|
|
31
31
|
}
|
|
32
32
|
headers["api-subscription-key"] = self.api_subscription_key
|
|
@@ -32,6 +32,8 @@ from .error_details import ErrorDetailsParams
|
|
|
32
32
|
from .error_message import ErrorMessageParams
|
|
33
33
|
from .error_response import ErrorResponseParams
|
|
34
34
|
from .error_response_data import ErrorResponseDataParams
|
|
35
|
+
from .event_response import EventResponseParams
|
|
36
|
+
from .event_response_data import EventResponseDataParams
|
|
35
37
|
from .events_data import EventsDataParams
|
|
36
38
|
from .file_signed_url_details import FileSignedUrlDetailsParams
|
|
37
39
|
from .files_download_response import FilesDownloadResponseParams
|
|
@@ -92,6 +94,8 @@ __all__ = [
|
|
|
92
94
|
"ErrorMessageParams",
|
|
93
95
|
"ErrorResponseDataParams",
|
|
94
96
|
"ErrorResponseParams",
|
|
97
|
+
"EventResponseDataParams",
|
|
98
|
+
"EventResponseParams",
|
|
95
99
|
"EventsDataParams",
|
|
96
100
|
"FileSignedUrlDetailsParams",
|
|
97
101
|
"FilesDownloadResponseParams",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..types.audio_data_input_audio_codec import AudioDataInputAudioCodec
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AudioDataParams(typing_extensions.TypedDict):
|
|
10
|
+
data: str
|
|
11
|
+
"""
|
|
12
|
+
Base64 encoded audio data
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
sample_rate: int
|
|
16
|
+
"""
|
|
17
|
+
Audio sample rate in Hz for individual audio messages.
|
|
18
|
+
|
|
19
|
+
**Backward Compatibility**: This property is maintained for legacy support.
|
|
20
|
+
**Recommended**: Use the connection-level sample_rate parameter instead.
|
|
21
|
+
**Note**: 8kHz is only supported via connection parameter, not in AudioData messages.
|
|
22
|
+
|
|
23
|
+
Supported values: 16kHz (preferred), 22.05kHz, 24kHz
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
encoding: typing.Literal["audio/wav"]
|
|
27
|
+
"""
|
|
28
|
+
Audio encoding format
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
input_audio_codec: typing_extensions.NotRequired[AudioDataInputAudioCodec]
|
|
32
|
+
"""
|
|
33
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
34
|
+
"""
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from .event_response_data import EventResponseDataParams
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EventResponseParams(typing_extensions.TypedDict):
|
|
10
|
+
"""
|
|
11
|
+
Event notification message sent when specific events occur during TTS processing
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
type: typing.Literal["event"]
|
|
15
|
+
"""
|
|
16
|
+
Message type identifier for events
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
data: EventResponseDataParams
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import typing_extensions
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EventResponseDataParams(typing_extensions.TypedDict):
|
|
10
|
+
event_type: typing.Literal["final"]
|
|
11
|
+
"""
|
|
12
|
+
Type of event that occurred
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
message: typing_extensions.NotRequired[str]
|
|
16
|
+
"""
|
|
17
|
+
Human-readable description of the event
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
timestamp: typing_extensions.NotRequired[dt.datetime]
|
|
21
|
+
"""
|
|
22
|
+
ISO 8601 timestamp when the event occurred
|
|
23
|
+
"""
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
from .types import (
|
|
6
6
|
SpeechToTextStreamingFlushSignal,
|
|
7
7
|
SpeechToTextStreamingHighVadSensitivity,
|
|
8
|
+
SpeechToTextStreamingInputAudioCodec,
|
|
8
9
|
SpeechToTextStreamingLanguageCode,
|
|
9
10
|
SpeechToTextStreamingModel,
|
|
10
11
|
SpeechToTextStreamingVadSignals,
|
|
@@ -13,6 +14,7 @@ from .types import (
|
|
|
13
14
|
__all__ = [
|
|
14
15
|
"SpeechToTextStreamingFlushSignal",
|
|
15
16
|
"SpeechToTextStreamingHighVadSensitivity",
|
|
17
|
+
"SpeechToTextStreamingInputAudioCodec",
|
|
16
18
|
"SpeechToTextStreamingLanguageCode",
|
|
17
19
|
"SpeechToTextStreamingModel",
|
|
18
20
|
"SpeechToTextStreamingVadSignals",
|
|
@@ -13,6 +13,7 @@ from .raw_client import AsyncRawSpeechToTextStreamingClient, RawSpeechToTextStre
|
|
|
13
13
|
from .socket_client import AsyncSpeechToTextStreamingSocketClient, SpeechToTextStreamingSocketClient
|
|
14
14
|
from .types.speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
|
|
15
15
|
from .types.speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
|
|
16
|
+
from .types.speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
|
|
16
17
|
from .types.speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
|
|
17
18
|
from .types.speech_to_text_streaming_model import SpeechToTextStreamingModel
|
|
18
19
|
from .types.speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
|
|
@@ -44,6 +45,8 @@ class SpeechToTextStreamingClient:
|
|
|
44
45
|
*,
|
|
45
46
|
language_code: SpeechToTextStreamingLanguageCode,
|
|
46
47
|
model: typing.Optional[SpeechToTextStreamingModel] = None,
|
|
48
|
+
input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
|
|
49
|
+
sample_rate: typing.Optional[str] = None,
|
|
47
50
|
high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
|
|
48
51
|
vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
|
|
49
52
|
flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
|
|
@@ -61,6 +64,12 @@ class SpeechToTextStreamingClient:
|
|
|
61
64
|
model : typing.Optional[SpeechToTextStreamingModel]
|
|
62
65
|
Speech to text model to use
|
|
63
66
|
|
|
67
|
+
input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
|
|
68
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
69
|
+
|
|
70
|
+
sample_rate : typing.Optional[str]
|
|
71
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
72
|
+
|
|
64
73
|
high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
|
|
65
74
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
66
75
|
|
|
@@ -86,6 +95,10 @@ class SpeechToTextStreamingClient:
|
|
|
86
95
|
query_params = query_params.add("language-code", language_code)
|
|
87
96
|
if model is not None:
|
|
88
97
|
query_params = query_params.add("model", model)
|
|
98
|
+
if input_audio_codec is not None:
|
|
99
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
100
|
+
if sample_rate is not None:
|
|
101
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
89
102
|
if high_vad_sensitivity is not None:
|
|
90
103
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
91
104
|
if vad_signals is not None:
|
|
@@ -137,6 +150,8 @@ class AsyncSpeechToTextStreamingClient:
|
|
|
137
150
|
*,
|
|
138
151
|
language_code: SpeechToTextStreamingLanguageCode,
|
|
139
152
|
model: typing.Optional[SpeechToTextStreamingModel] = None,
|
|
153
|
+
input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
|
|
154
|
+
sample_rate: typing.Optional[str] = None,
|
|
140
155
|
high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
|
|
141
156
|
vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
|
|
142
157
|
flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
|
|
@@ -154,6 +169,12 @@ class AsyncSpeechToTextStreamingClient:
|
|
|
154
169
|
model : typing.Optional[SpeechToTextStreamingModel]
|
|
155
170
|
Speech to text model to use
|
|
156
171
|
|
|
172
|
+
input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
|
|
173
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
174
|
+
|
|
175
|
+
sample_rate : typing.Optional[str]
|
|
176
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
177
|
+
|
|
157
178
|
high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
|
|
158
179
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
159
180
|
|
|
@@ -179,6 +200,10 @@ class AsyncSpeechToTextStreamingClient:
|
|
|
179
200
|
query_params = query_params.add("language-code", language_code)
|
|
180
201
|
if model is not None:
|
|
181
202
|
query_params = query_params.add("model", model)
|
|
203
|
+
if input_audio_codec is not None:
|
|
204
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
205
|
+
if sample_rate is not None:
|
|
206
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
182
207
|
if high_vad_sensitivity is not None:
|
|
183
208
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
184
209
|
if vad_signals is not None:
|
|
@@ -12,6 +12,7 @@ from ..core.request_options import RequestOptions
|
|
|
12
12
|
from .socket_client import AsyncSpeechToTextStreamingSocketClient, SpeechToTextStreamingSocketClient
|
|
13
13
|
from .types.speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
|
|
14
14
|
from .types.speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
|
|
15
|
+
from .types.speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
|
|
15
16
|
from .types.speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
|
|
16
17
|
from .types.speech_to_text_streaming_model import SpeechToTextStreamingModel
|
|
17
18
|
from .types.speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
|
|
@@ -32,6 +33,8 @@ class RawSpeechToTextStreamingClient:
|
|
|
32
33
|
*,
|
|
33
34
|
language_code: SpeechToTextStreamingLanguageCode,
|
|
34
35
|
model: typing.Optional[SpeechToTextStreamingModel] = None,
|
|
36
|
+
input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
|
|
37
|
+
sample_rate: typing.Optional[str] = None,
|
|
35
38
|
high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
|
|
36
39
|
vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
|
|
37
40
|
flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
|
|
@@ -49,6 +52,12 @@ class RawSpeechToTextStreamingClient:
|
|
|
49
52
|
model : typing.Optional[SpeechToTextStreamingModel]
|
|
50
53
|
Speech to text model to use
|
|
51
54
|
|
|
55
|
+
input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
|
|
56
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
57
|
+
|
|
58
|
+
sample_rate : typing.Optional[str]
|
|
59
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
60
|
+
|
|
52
61
|
high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
|
|
53
62
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
54
63
|
|
|
@@ -74,6 +83,10 @@ class RawSpeechToTextStreamingClient:
|
|
|
74
83
|
query_params = query_params.add("language-code", language_code)
|
|
75
84
|
if model is not None:
|
|
76
85
|
query_params = query_params.add("model", model)
|
|
86
|
+
if input_audio_codec is not None:
|
|
87
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
88
|
+
if sample_rate is not None:
|
|
89
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
77
90
|
if high_vad_sensitivity is not None:
|
|
78
91
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
79
92
|
if vad_signals is not None:
|
|
@@ -114,6 +127,8 @@ class AsyncRawSpeechToTextStreamingClient:
|
|
|
114
127
|
*,
|
|
115
128
|
language_code: SpeechToTextStreamingLanguageCode,
|
|
116
129
|
model: typing.Optional[SpeechToTextStreamingModel] = None,
|
|
130
|
+
input_audio_codec: typing.Optional[SpeechToTextStreamingInputAudioCodec] = None,
|
|
131
|
+
sample_rate: typing.Optional[str] = None,
|
|
117
132
|
high_vad_sensitivity: typing.Optional[SpeechToTextStreamingHighVadSensitivity] = None,
|
|
118
133
|
vad_signals: typing.Optional[SpeechToTextStreamingVadSignals] = None,
|
|
119
134
|
flush_signal: typing.Optional[SpeechToTextStreamingFlushSignal] = None,
|
|
@@ -131,6 +146,12 @@ class AsyncRawSpeechToTextStreamingClient:
|
|
|
131
146
|
model : typing.Optional[SpeechToTextStreamingModel]
|
|
132
147
|
Speech to text model to use
|
|
133
148
|
|
|
149
|
+
input_audio_codec : typing.Optional[SpeechToTextStreamingInputAudioCodec]
|
|
150
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
151
|
+
|
|
152
|
+
sample_rate : typing.Optional[str]
|
|
153
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
154
|
+
|
|
134
155
|
high_vad_sensitivity : typing.Optional[SpeechToTextStreamingHighVadSensitivity]
|
|
135
156
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
136
157
|
|
|
@@ -156,6 +177,10 @@ class AsyncRawSpeechToTextStreamingClient:
|
|
|
156
177
|
query_params = query_params.add("language-code", language_code)
|
|
157
178
|
if model is not None:
|
|
158
179
|
query_params = query_params.add("model", model)
|
|
180
|
+
if input_audio_codec is not None:
|
|
181
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
182
|
+
if sample_rate is not None:
|
|
183
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
159
184
|
if high_vad_sensitivity is not None:
|
|
160
185
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
161
186
|
if vad_signals is not None:
|
{sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_streaming/types/__init__.py
RENAMED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
from .speech_to_text_streaming_flush_signal import SpeechToTextStreamingFlushSignal
|
|
6
6
|
from .speech_to_text_streaming_high_vad_sensitivity import SpeechToTextStreamingHighVadSensitivity
|
|
7
|
+
from .speech_to_text_streaming_input_audio_codec import SpeechToTextStreamingInputAudioCodec
|
|
7
8
|
from .speech_to_text_streaming_language_code import SpeechToTextStreamingLanguageCode
|
|
8
9
|
from .speech_to_text_streaming_model import SpeechToTextStreamingModel
|
|
9
10
|
from .speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignals
|
|
@@ -11,6 +12,7 @@ from .speech_to_text_streaming_vad_signals import SpeechToTextStreamingVadSignal
|
|
|
11
12
|
__all__ = [
|
|
12
13
|
"SpeechToTextStreamingFlushSignal",
|
|
13
14
|
"SpeechToTextStreamingHighVadSensitivity",
|
|
15
|
+
"SpeechToTextStreamingInputAudioCodec",
|
|
14
16
|
"SpeechToTextStreamingLanguageCode",
|
|
15
17
|
"SpeechToTextStreamingModel",
|
|
16
18
|
"SpeechToTextStreamingVadSignals",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
SpeechToTextStreamingInputAudioCodec = typing.Union[
|
|
6
|
+
typing.Literal[
|
|
7
|
+
"wav",
|
|
8
|
+
"x-wav",
|
|
9
|
+
"wave",
|
|
10
|
+
"mp3",
|
|
11
|
+
"mpeg",
|
|
12
|
+
"mpeg3",
|
|
13
|
+
"x-mp3",
|
|
14
|
+
"x-mpeg-3",
|
|
15
|
+
"aac",
|
|
16
|
+
"x-aac",
|
|
17
|
+
"aiff",
|
|
18
|
+
"x-aiff",
|
|
19
|
+
"ogg",
|
|
20
|
+
"opus",
|
|
21
|
+
"flac",
|
|
22
|
+
"x-flac",
|
|
23
|
+
"mp4",
|
|
24
|
+
"x-m4a",
|
|
25
|
+
"amr",
|
|
26
|
+
"x-ms-wma",
|
|
27
|
+
"webm",
|
|
28
|
+
"pcm_s16le",
|
|
29
|
+
"pcm_l16",
|
|
30
|
+
"pcm_raw",
|
|
31
|
+
],
|
|
32
|
+
typing.Any,
|
|
33
|
+
]
|
{sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/__init__.py
RENAMED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
from .types import (
|
|
6
6
|
SpeechToTextTranslateStreamingFlushSignal,
|
|
7
7
|
SpeechToTextTranslateStreamingHighVadSensitivity,
|
|
8
|
+
SpeechToTextTranslateStreamingInputAudioCodec,
|
|
8
9
|
SpeechToTextTranslateStreamingModel,
|
|
9
10
|
SpeechToTextTranslateStreamingVadSignals,
|
|
10
11
|
)
|
|
@@ -12,6 +13,7 @@ from .types import (
|
|
|
12
13
|
__all__ = [
|
|
13
14
|
"SpeechToTextTranslateStreamingFlushSignal",
|
|
14
15
|
"SpeechToTextTranslateStreamingHighVadSensitivity",
|
|
16
|
+
"SpeechToTextTranslateStreamingInputAudioCodec",
|
|
15
17
|
"SpeechToTextTranslateStreamingModel",
|
|
16
18
|
"SpeechToTextTranslateStreamingVadSignals",
|
|
17
19
|
]
|
{sarvamai-0.1.20a0 → sarvamai-0.1.20a2}/src/sarvamai/speech_to_text_translate_streaming/client.py
RENAMED
|
@@ -15,6 +15,7 @@ from .types.speech_to_text_translate_streaming_flush_signal import SpeechToTextT
|
|
|
15
15
|
from .types.speech_to_text_translate_streaming_high_vad_sensitivity import (
|
|
16
16
|
SpeechToTextTranslateStreamingHighVadSensitivity,
|
|
17
17
|
)
|
|
18
|
+
from .types.speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
|
|
18
19
|
from .types.speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
|
|
19
20
|
from .types.speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
|
|
20
21
|
|
|
@@ -44,6 +45,8 @@ class SpeechToTextTranslateStreamingClient:
|
|
|
44
45
|
self,
|
|
45
46
|
*,
|
|
46
47
|
model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
|
|
48
|
+
input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
|
|
49
|
+
sample_rate: typing.Optional[str] = None,
|
|
47
50
|
high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
|
|
48
51
|
vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
|
|
49
52
|
flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
|
|
@@ -58,6 +61,12 @@ class SpeechToTextTranslateStreamingClient:
|
|
|
58
61
|
model : typing.Optional[SpeechToTextTranslateStreamingModel]
|
|
59
62
|
Speech to text model to use (defaults to "saaras:v2.5" if not specified)
|
|
60
63
|
|
|
64
|
+
input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
|
|
65
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
66
|
+
|
|
67
|
+
sample_rate : typing.Optional[str]
|
|
68
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
69
|
+
|
|
61
70
|
high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
|
|
62
71
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
63
72
|
|
|
@@ -81,6 +90,10 @@ class SpeechToTextTranslateStreamingClient:
|
|
|
81
90
|
query_params = httpx.QueryParams()
|
|
82
91
|
if model is not None:
|
|
83
92
|
query_params = query_params.add("model", model)
|
|
93
|
+
if input_audio_codec is not None:
|
|
94
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
95
|
+
if sample_rate is not None:
|
|
96
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
84
97
|
if high_vad_sensitivity is not None:
|
|
85
98
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
86
99
|
if vad_signals is not None:
|
|
@@ -131,6 +144,8 @@ class AsyncSpeechToTextTranslateStreamingClient:
|
|
|
131
144
|
self,
|
|
132
145
|
*,
|
|
133
146
|
model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
|
|
147
|
+
input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
|
|
148
|
+
sample_rate: typing.Optional[str] = None,
|
|
134
149
|
high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
|
|
135
150
|
vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
|
|
136
151
|
flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
|
|
@@ -145,6 +160,12 @@ class AsyncSpeechToTextTranslateStreamingClient:
|
|
|
145
160
|
model : typing.Optional[SpeechToTextTranslateStreamingModel]
|
|
146
161
|
Speech to text model to use (defaults to "saaras:v2.5" if not specified)
|
|
147
162
|
|
|
163
|
+
input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
|
|
164
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
165
|
+
|
|
166
|
+
sample_rate : typing.Optional[str]
|
|
167
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
168
|
+
|
|
148
169
|
high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
|
|
149
170
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
150
171
|
|
|
@@ -168,6 +189,10 @@ class AsyncSpeechToTextTranslateStreamingClient:
|
|
|
168
189
|
query_params = httpx.QueryParams()
|
|
169
190
|
if model is not None:
|
|
170
191
|
query_params = query_params.add("model", model)
|
|
192
|
+
if input_audio_codec is not None:
|
|
193
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
194
|
+
if sample_rate is not None:
|
|
195
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
171
196
|
if high_vad_sensitivity is not None:
|
|
172
197
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
173
198
|
if vad_signals is not None:
|
|
@@ -14,6 +14,7 @@ from .types.speech_to_text_translate_streaming_flush_signal import SpeechToTextT
|
|
|
14
14
|
from .types.speech_to_text_translate_streaming_high_vad_sensitivity import (
|
|
15
15
|
SpeechToTextTranslateStreamingHighVadSensitivity,
|
|
16
16
|
)
|
|
17
|
+
from .types.speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
|
|
17
18
|
from .types.speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
|
|
18
19
|
from .types.speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
|
|
19
20
|
|
|
@@ -32,6 +33,8 @@ class RawSpeechToTextTranslateStreamingClient:
|
|
|
32
33
|
self,
|
|
33
34
|
*,
|
|
34
35
|
model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
|
|
36
|
+
input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
|
|
37
|
+
sample_rate: typing.Optional[str] = None,
|
|
35
38
|
high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
|
|
36
39
|
vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
|
|
37
40
|
flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
|
|
@@ -46,6 +49,12 @@ class RawSpeechToTextTranslateStreamingClient:
|
|
|
46
49
|
model : typing.Optional[SpeechToTextTranslateStreamingModel]
|
|
47
50
|
Speech to text model to use (defaults to "saaras:v2.5" if not specified)
|
|
48
51
|
|
|
52
|
+
input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
|
|
53
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
54
|
+
|
|
55
|
+
sample_rate : typing.Optional[str]
|
|
56
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
57
|
+
|
|
49
58
|
high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
|
|
50
59
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
51
60
|
|
|
@@ -69,6 +78,10 @@ class RawSpeechToTextTranslateStreamingClient:
|
|
|
69
78
|
query_params = httpx.QueryParams()
|
|
70
79
|
if model is not None:
|
|
71
80
|
query_params = query_params.add("model", model)
|
|
81
|
+
if input_audio_codec is not None:
|
|
82
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
83
|
+
if sample_rate is not None:
|
|
84
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
72
85
|
if high_vad_sensitivity is not None:
|
|
73
86
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
74
87
|
if vad_signals is not None:
|
|
@@ -108,6 +121,8 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
|
|
|
108
121
|
self,
|
|
109
122
|
*,
|
|
110
123
|
model: typing.Optional[SpeechToTextTranslateStreamingModel] = None,
|
|
124
|
+
input_audio_codec: typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec] = None,
|
|
125
|
+
sample_rate: typing.Optional[str] = None,
|
|
111
126
|
high_vad_sensitivity: typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity] = None,
|
|
112
127
|
vad_signals: typing.Optional[SpeechToTextTranslateStreamingVadSignals] = None,
|
|
113
128
|
flush_signal: typing.Optional[SpeechToTextTranslateStreamingFlushSignal] = None,
|
|
@@ -122,6 +137,12 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
|
|
|
122
137
|
model : typing.Optional[SpeechToTextTranslateStreamingModel]
|
|
123
138
|
Speech to text model to use (defaults to "saaras:v2.5" if not specified)
|
|
124
139
|
|
|
140
|
+
input_audio_codec : typing.Optional[SpeechToTextTranslateStreamingInputAudioCodec]
|
|
141
|
+
Audio codec/format of the input file. Our API automatically detects all codec formats, but for PCM files specifically (pcm_s16le, pcm_l16, pcm_raw), you must pass this parameter. PCM files supports sample rate 16000 and 8000.
|
|
142
|
+
|
|
143
|
+
sample_rate : typing.Optional[str]
|
|
144
|
+
Audio sample rate for the WebSocket connection. When specified as a connection parameter, only 16kHz and 8kHz are supported. 8kHz is only available via this connection parameter. If not specified, defaults to 16kHz.
|
|
145
|
+
|
|
125
146
|
high_vad_sensitivity : typing.Optional[SpeechToTextTranslateStreamingHighVadSensitivity]
|
|
126
147
|
Enable high VAD (Voice Activity Detection) sensitivity
|
|
127
148
|
|
|
@@ -145,6 +166,10 @@ class AsyncRawSpeechToTextTranslateStreamingClient:
|
|
|
145
166
|
query_params = httpx.QueryParams()
|
|
146
167
|
if model is not None:
|
|
147
168
|
query_params = query_params.add("model", model)
|
|
169
|
+
if input_audio_codec is not None:
|
|
170
|
+
query_params = query_params.add("input_audio_codec", input_audio_codec)
|
|
171
|
+
if sample_rate is not None:
|
|
172
|
+
query_params = query_params.add("sample_rate", sample_rate)
|
|
148
173
|
if high_vad_sensitivity is not None:
|
|
149
174
|
query_params = query_params.add("high_vad_sensitivity", high_vad_sensitivity)
|
|
150
175
|
if vad_signals is not None:
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
from .speech_to_text_translate_streaming_flush_signal import SpeechToTextTranslateStreamingFlushSignal
|
|
6
6
|
from .speech_to_text_translate_streaming_high_vad_sensitivity import SpeechToTextTranslateStreamingHighVadSensitivity
|
|
7
|
+
from .speech_to_text_translate_streaming_input_audio_codec import SpeechToTextTranslateStreamingInputAudioCodec
|
|
7
8
|
from .speech_to_text_translate_streaming_model import SpeechToTextTranslateStreamingModel
|
|
8
9
|
from .speech_to_text_translate_streaming_vad_signals import SpeechToTextTranslateStreamingVadSignals
|
|
9
10
|
|
|
10
11
|
__all__ = [
|
|
11
12
|
"SpeechToTextTranslateStreamingFlushSignal",
|
|
12
13
|
"SpeechToTextTranslateStreamingHighVadSensitivity",
|
|
14
|
+
"SpeechToTextTranslateStreamingInputAudioCodec",
|
|
13
15
|
"SpeechToTextTranslateStreamingModel",
|
|
14
16
|
"SpeechToTextTranslateStreamingVadSignals",
|
|
15
17
|
]
|