From 9ed60d5944c00546d714390b67c0b434503e81c8 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:35:39 +0000 Subject: [PATCH 1/5] SDK regeneration --- .../definition/empathic-voice/__package__.yml | 2248 ++++++++--------- .../definition/empathic-voice/chatGroups.yml | 156 +- .mock/definition/empathic-voice/configs.yml | 100 +- .mock/definition/empathic-voice/prompts.yml | 12 +- .mock/definition/empathic-voice/tools.yml | 42 +- .mock/definition/tts/__package__.yml | 33 +- poetry.lock | 211 +- pyproject.toml | 4 +- reference.md | 1970 +++++++-------- src/hume/base_client.py | 36 +- src/hume/core/client_wrapper.py | 4 +- src/hume/empathic_voice/chat_groups/client.py | 146 +- .../empathic_voice/chat_groups/raw_client.py | 186 +- src/hume/empathic_voice/configs/client.py | 228 +- src/hume/empathic_voice/configs/raw_client.py | 324 +-- src/hume/empathic_voice/prompts/raw_client.py | 8 +- src/hume/empathic_voice/tools/client.py | 40 +- src/hume/empathic_voice/tools/raw_client.py | 52 +- .../empathic_voice/types/error_response.py | 2 +- .../types/posted_builtin_tool.py | 10 +- .../types/posted_config_prompt_spec.py | 8 +- .../types/posted_event_message_specs.py | 10 +- .../types/posted_timeout_spec.py | 8 +- .../types/posted_webhook_event_type.py | 2 +- .../types/posted_webhook_spec.py | 10 +- .../types/return_builtin_tool.py | 8 +- src/hume/empathic_voice/types/return_chat.py | 47 +- .../types/return_chat_audio_reconstruction.py | 38 +- .../empathic_voice/types/return_chat_event.py | 52 +- .../empathic_voice/types/return_chat_group.py | 16 +- ..._chat_group_paged_audio_reconstructions.py | 22 +- .../types/return_chat_group_paged_chats.py | 28 +- .../types/return_chat_group_paged_events.py | 14 +- .../types/return_chat_paged_events.py | 69 +- .../empathic_voice/types/return_config.py | 70 +- .../types/return_event_message_specs.py | 10 +- .../types/return_paged_chat_groups.py | 14 +- .../types/return_paged_chats.py | 14 +- .../types/return_paged_configs.py | 10 +- .../types/return_paged_prompts.py | 8 +- .../types/return_paged_user_defined_tools.py | 8 +- .../empathic_voice/types/return_prompt.py | 37 +- .../types/return_timeout_spec.py | 10 +- .../types/return_user_defined_tool.py | 52 +- src/hume/empathic_voice/types/return_voice.py | 2 +- .../types/return_webhook_event_type.py | 2 +- .../types/return_webhook_spec.py | 10 +- src/hume/tts/raw_client.py | 16 +- src/hume/tts/types/error_response.py | 2 +- src/hume/tts/types/posted_tts.py | 2 +- src/hume/tts/types/return_voice.py | 3 +- src/hume/tts/types/snippet.py | 2 +- src/hume/tts/types/timestamp.py | 12 +- 53 files changed, 3186 insertions(+), 3242 deletions(-) diff --git a/.mock/definition/empathic-voice/__package__.yml b/.mock/definition/empathic-voice/__package__.yml index e72d5576..435263c7 100644 --- a/.mock/definition/empathic-voice/__package__.yml +++ b/.mock/definition/empathic-voice/__package__.yml @@ -997,31 +997,54 @@ types: discriminated: false union: - type: AssistantEnd + docs: When provided, the output is an assistant end message. - type: AssistantMessage + docs: When provided, the output is an assistant message. - type: AssistantProsody + docs: When provided, the output is an Assistant Prosody message. - type: AudioOutput + docs: >- + The type of message sent through the socket; for an Audio Output + message, this must be `audio_output`. - type: ChatMetadata + docs: When provided, the output is a chat metadata message. - type: WebSocketError + docs: When provided, the output is an error message. - type: UserInterruption + docs: When provided, the output is an interruption. - type: UserMessage + docs: When provided, the output is a user message. - type: ToolCallMessage + docs: When provided, the output is a tool call. - type: ToolResponseMessage + docs: When provided, the output is a function call response. - type: ToolErrorMessage + docs: When provided, the output is a function call error. source: openapi: evi-asyncapi.json JsonMessage: discriminated: false union: - type: AssistantEnd + docs: When provided, the output is an assistant end message. - type: AssistantMessage + docs: When provided, the output is an assistant message. - type: AssistantProsody + docs: When provided, the output is an Assistant Prosody message. - type: ChatMetadata + docs: When provided, the output is a chat metadata message. - type: WebSocketError + docs: When provided, the output is an error message. - type: UserInterruption + docs: When provided, the output is an interruption. - type: UserMessage + docs: When provided, the output is a user message. - type: ToolCallMessage + docs: When provided, the output is a tool call. - type: ToolResponseMessage + docs: When provided, the output is a function call response. - type: ToolErrorMessage + docs: When provided, the output is a function call error. source: openapi: evi-asyncapi.json ConnectSessionSettingsAudio: @@ -1206,12 +1229,38 @@ types: discriminated: false union: - type: SessionSettings + docs: Settings for this chat session. - type: UserInput + docs: >- + User text to insert into the conversation. Text sent through a User + Input message is treated as the user's speech to EVI. EVI processes + this input and provides a corresponding response. + + + Expression measurement results are not available for User Input + messages, as the prosody model relies on audio input and cannot + process text alone. - type: AssistantInput + docs: When provided, the input is spoken by EVI. - type: ToolResponseMessage + docs: When provided, the output is a function call response. - type: ToolErrorMessage + docs: When provided, the output is a function call error. - type: PauseAssistantMessage + docs: >- + Pause responses from EVI. Chat history is still saved and sent after + resuming. - type: ResumeAssistantMessage + docs: >- + Resume responses from EVI. Chat history sent while paused will now be + sent. + source: + openapi: evi-openapi.json + ErrorResponse: + properties: + code: optional + error: optional + message: optional source: openapi: evi-openapi.json HTTPValidationError: @@ -1358,6 +1407,84 @@ types: - CEREBRAS source: openapi: evi-openapi.json + ReturnChatAudioReconstructionStatus: + enum: + - QUEUED + - IN_PROGRESS + - COMPLETE + - ERROR + - CANCELLED + docs: >- + Indicates the current state of the audio reconstruction job. There are + five possible statuses: + + + - `QUEUED`: The reconstruction job is waiting to be processed. + + + - `IN_PROGRESS`: The reconstruction is currently being processed. + + + - `COMPLETE`: The audio reconstruction is finished and ready for download. + + + - `ERROR`: An error occurred during the reconstruction process. + + + - `CANCELED`: The reconstruction job has been canceled. + inline: true + source: + openapi: evi-openapi.json + ReturnChatAudioReconstruction: + docs: >- + List of chat audio reconstructions returned for the specified page number + and page size. + properties: + filename: + type: optional + docs: Name of the chat audio reconstruction file. + id: + type: string + docs: Identifier for the chat. Formatted as a UUID. + modified_at: + type: optional + docs: >- + The timestamp of the most recent status change for this audio + reconstruction, formatted milliseconds since the Unix epoch. + signed_audio_url: + type: optional + docs: Signed URL used to download the chat audio reconstruction file. + signed_url_expiration_timestamp_millis: + type: optional + docs: >- + The timestamp when the signed URL will expire, formatted as a Unix + epoch milliseconds. + status: + type: ReturnChatAudioReconstructionStatus + docs: >- + Indicates the current state of the audio reconstruction job. There are + five possible statuses: + + + - `QUEUED`: The reconstruction job is waiting to be processed. + + + - `IN_PROGRESS`: The reconstruction is currently being processed. + + + - `COMPLETE`: The audio reconstruction is finished and ready for + download. + + + - `ERROR`: An error occurred during the reconstruction process. + + + - `CANCELED`: The reconstruction job has been canceled. + user_id: + type: string + docs: Identifier for the user that owns this chat. Formatted as a UUID. + source: + openapi: evi-openapi.json ValidationErrorLocItem: discriminated: false union: @@ -1508,389 +1635,357 @@ types: - WebhookEventBase source: openapi: evi-openapi.json - ErrorResponse: - properties: - error: optional - message: optional - code: optional + PostedBuiltinToolName: + enum: + - web_search + - hang_up + docs: >- + Name of the built-in tool to use. Hume supports the following built-in + tools: + + + - **web_search:** enables EVI to search the web for up-to-date information + when applicable. + + - **hang_up:** closes the WebSocket connection when appropriate (e.g., + after detecting a farewell in the conversation). + + + For more information, see our guide on [using built-in + tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). + inline: true source: openapi: evi-openapi.json - ReturnPagedUserDefinedTools: - docs: A paginated list of user defined tool versions returned from the server + PostedBuiltinTool: + docs: A configuration of a built-in tool to be posted to the server properties: - page_number: - type: integer + fallback_content: + type: optional docs: >- - The page number of the returned list. + Optional text passed to the supplemental LLM in place of the tool call + result. The LLM then uses this text to generate a response back to the + user, ensuring continuity in the conversation if the Tool errors. + name: + type: PostedBuiltinToolName + docs: >- + Name of the built-in tool to use. Hume supports the following built-in + tools: - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: integer - docs: >- - The maximum number of items returned per page. + - **web_search:** enables EVI to search the web for up-to-date + information when applicable. + - **hang_up:** closes the WebSocket connection when appropriate (e.g., + after detecting a farewell in the conversation). - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. - tools_page: - docs: >- - List of tools returned for the specified `page_number` and - `page_size`. - type: list> + + For more information, see our guide on [using built-in + tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). source: openapi: evi-openapi.json - ReturnUserDefinedToolToolType: - enum: - - BUILTIN - - FUNCTION + PostedConfigPromptSpec: docs: >- - Type of Tool. Either `BUILTIN` for natively implemented tools, like web - search, or `FUNCTION` for user-defined tools. - inline: true + Identifies which prompt to use in a a config OR how to create a new prompt + to use in the config + properties: + id: + type: optional + docs: Identifier for a Prompt. Formatted as a UUID. + text: + type: optional + docs: Text used to create a new prompt for a particular config. + version: + type: optional + docs: >- + Version number for a Prompt. Version numbers should be integers. The + combination of configId and version number is unique. source: openapi: evi-openapi.json - ReturnUserDefinedToolVersionType: - enum: - - FIXED - - LATEST - docs: >- - Versioning method for a Tool. Either `FIXED` for using a fixed version - number or `LATEST` for auto-updating to the latest version. - inline: true + PostedEllmModel: + docs: A eLLM model configuration to be posted to the server + properties: + allow_short_responses: + type: optional + docs: |- + Boolean indicating if the eLLM is allowed to generate short responses. + + If omitted, short responses from the eLLM are enabled by default. source: openapi: evi-openapi.json - ReturnUserDefinedTool: - docs: A specific tool version returned from the server + PostedEventMessageSpec: + docs: Settings for a specific event_message to be posted to the server properties: - tool_type: - type: ReturnUserDefinedToolToolType - docs: >- - Type of Tool. Either `BUILTIN` for natively implemented tools, like - web search, or `FUNCTION` for user-defined tools. - id: - type: string - docs: Identifier for a Tool. Formatted as a UUID. - version: - type: integer + enabled: + type: boolean docs: >- - Version number for a Tool. + Boolean indicating if this event message is enabled. - Tools, Configs, Custom Voices, and Prompts are versioned. This - versioning system supports iterative development, allowing you to - progressively refine tools and revert to previous versions if needed. + If set to `true`, a message will be sent when the circumstances for + the specific event are met. + text: + type: optional + docs: >- + Text to use as the event message when the corresponding event occurs. + If no text is specified, EVI will generate an appropriate message + based on its current context and the system prompt. + source: + openapi: evi-openapi.json + PostedEventMessageSpecs: + docs: >- + Collection of event messages returned by the server. - Version numbers are integer values representing different iterations - of the Tool. Each update to the Tool increments its version number. - version_type: - type: ReturnUserDefinedToolVersionType + Event messages are sent by the server when specific events occur during a + chat session. These messages are used to configure behaviors for EVI, such + as controlling how EVI starts a new conversation. + properties: + on_inactivity_timeout: + type: optional docs: >- - Versioning method for a Tool. Either `FIXED` for using a fixed version - number or `LATEST` for auto-updating to the latest version. - version_description: - type: optional - docs: An optional description of the Tool version. - name: - type: string - docs: Name applied to all versions of a particular Tool. - created_on: - type: long - docs: >- - Time at which the Tool was created. Measured in seconds since the Unix - epoch. - modified_on: - type: long - docs: >- - Time at which the Tool was last modified. Measured in seconds since - the Unix epoch. - fallback_content: - type: optional - docs: >- - Optional text passed to the supplemental LLM in place of the tool call - result. The LLM then uses this text to generate a response back to the - user, ensuring continuity in the conversation if the Tool errors. - description: - type: optional - docs: >- - An optional description of what the Tool does, used by the - supplemental LLM to choose when and how to call the function. - parameters: - type: string - docs: >- - Stringified JSON defining the parameters used by this version of the - Tool. + Specifies the message EVI provides when the chat is about to be + disconnected due to a user inactivity timeout, such as a message + mentioning a lack of user input for a period of time. - These parameters define the inputs needed for the Tool's execution, - including the expected data type and description for each input field. - Structured as a stringified JSON schema, this format ensures the tool - receives data in the expected format. + Enabling an inactivity message allows developers to use this message + event for "checking in" with the user if they are not responding to + see if they are still active. + + + If the user does not respond in the number of seconds specified in the + `inactivity_timeout` field, then EVI will say the message and the user + has 15 seconds to respond. If they respond in time, the conversation + will continue; if not, the conversation will end. + + + However, if the inactivity message is not enabled, then reaching the + inactivity timeout will immediately end the connection. + on_max_duration_timeout: + type: optional + docs: >- + Specifies the message EVI provides when the chat is disconnected due + to reaching the maximum chat duration, such as a message mentioning + the time limit for the chat has been reached. + on_new_chat: + type: optional + docs: >- + Specifies the initial message EVI provides when a new chat is started, + such as a greeting or welcome message. source: openapi: evi-openapi.json - ReturnPagedPrompts: - docs: A paginated list of prompt versions returned from the server + PostedLanguageModel: + docs: A LanguageModel to be posted to the server properties: - page_number: - type: integer - docs: >- - The page number of the returned list. - - - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: integer + model_provider: + type: optional + docs: The provider of the supplemental language model. + model_resource: + type: optional + docs: String that specifies the language model to use with `model_provider`. + temperature: + type: optional docs: >- - The maximum number of items returned per page. + The model temperature, with values between 0 to 1 (inclusive). - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. - prompts_page: - docs: >- - List of prompts returned for the specified `page_number` and - `page_size`. - type: list> + Controls the randomness of the LLM's output, with values closer to 0 + yielding focused, deterministic responses and values closer to 1 + producing more creative, diverse responses. source: openapi: evi-openapi.json - ReturnPrompt: - docs: A Prompt associated with this Config. + PostedNudgeSpec: + docs: A nudge specification posted to the server properties: - name: - type: string - docs: Name applied to all versions of a particular Prompt. - id: - type: string - docs: Identifier for a Prompt. Formatted as a UUID. - text: - type: string + enabled: + type: optional docs: >- - Instructions used to shape EVI's behavior, responses, and style. + If true, EVI will 'nudge' the user to speak after a determined + interval of silence. + interval_secs: + type: optional + docs: The interval of inactivity (in seconds) before a nudge is triggered. + source: + openapi: evi-openapi.json + PostedTimeoutSpec: + docs: Settings for a specific timeout to be posted to the server + properties: + duration_secs: + type: optional + docs: Duration in seconds for the timeout. + enabled: + type: boolean + docs: Boolean indicating if this event message is enabled. + source: + openapi: evi-openapi.json + PostedTimeoutSpecsInactivity: + docs: >- + Specifies the duration of user inactivity (in seconds) after which the EVI + WebSocket connection will be automatically disconnected. Default is 600 + seconds (10 minutes). - You can use the Prompt to define a specific goal or role for EVI, - specifying how it should act or what it should focus on during the - conversation. For example, EVI can be instructed to act as a customer - support representative, a fitness coach, or a travel advisor, each - with its own set of behaviors and response styles. For help writing a - system prompt, see our [Prompting - Guide](/docs/speech-to-speech-evi/guides/prompting). - version: - type: integer + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. + properties: + duration_secs: + type: optional + docs: >- + Duration in seconds for the timeout (e.g. 600 seconds represents 10 + minutes). + enabled: + type: boolean docs: >- - Version number for a Prompt. + Boolean indicating if this timeout is enabled. - Prompts, Configs, Custom Voices, and Tools are versioned. This - versioning system supports iterative development, allowing you to - progressively refine prompts and revert to previous versions if - needed. + If set to false, EVI will not timeout due to a specified duration of + user inactivity being reached. However, the conversation will + eventually disconnect after 1,800 seconds (30 minutes), which is the + maximum WebSocket duration limit for EVI. + source: + openapi: evi-openapi.json + inline: true + PostedTimeoutSpecsMaxDuration: + docs: >- + Specifies the maximum allowed duration (in seconds) for an EVI WebSocket + connection before it is automatically disconnected. Default is 1,800 + seconds (30 minutes). - Version numbers are integer values representing different iterations - of the Prompt. Each update to the Prompt increments its version - number. - version_type: - type: ReturnPromptVersionType - docs: >- - Versioning method for a Prompt. Either `FIXED` for using a fixed - version number or `LATEST` for auto-updating to the latest version. - created_on: - type: long + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. + properties: + duration_secs: + type: optional docs: >- - Time at which the Prompt was created. Measured in seconds since the - Unix epoch. - modified_on: - type: long + Duration in seconds for the timeout (e.g. 600 seconds represents 10 + minutes). + enabled: + type: boolean docs: >- - Time at which the Prompt was last modified. Measured in seconds since - the Unix epoch. - version_description: - type: optional - docs: An optional description of the Prompt version. + Boolean indicating if this timeout is enabled. + + + If set to false, EVI will not timeout due to a specified maximum + duration being reached. However, the conversation will eventually + disconnect after 1,800 seconds (30 minutes), which is the maximum + WebSocket duration limit for EVI. source: openapi: evi-openapi.json - ReturnPagedConfigs: - docs: A paginated list of config versions returned from the server + inline: true + PostedTimeoutSpecs: + docs: >- + Collection of timeout specifications returned by the server. + + + Timeouts are sent by the server when specific time-based events occur + during a chat session. These specifications set the inactivity timeout and + the maximum duration an EVI WebSocket connection can stay open before it + is automatically disconnected. properties: - page_number: - type: optional + inactivity: + type: optional docs: >- - The page number of the returned list. + Specifies the duration of user inactivity (in seconds) after which the + EVI WebSocket connection will be automatically disconnected. Default + is 600 seconds (10 minutes). - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: optional + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. + max_duration: + type: optional docs: >- - The maximum number of items returned per page. + Specifies the maximum allowed duration (in seconds) for an EVI + WebSocket connection before it is automatically disconnected. Default + is 1,800 seconds (30 minutes). - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. - configs_page: - type: optional> - docs: >- - List of configs returned for the specified `page_number` and - `page_size`. + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. source: openapi: evi-openapi.json - ReturnConfig: - docs: A specific config version returned from the server + PostedUserDefinedToolSpec: + docs: A specific tool identifier to be posted to the server properties: - name: - type: optional - docs: Name applied to all versions of a particular Config. id: - type: optional - docs: Identifier for a Config. Formatted as a UUID. + type: string + docs: Identifier for a Tool. Formatted as a UUID. version: type: optional docs: >- - Version number for a Config. + Version number for a Tool. - Configs, Prompts, Custom Voices, and Tools are versioned. This + Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to - progressively refine configurations and revert to previous versions if - needed. + progressively refine tools and revert to previous versions if needed. Version numbers are integer values representing different iterations - of the Config. Each update to the Config increments its version - number. - language_model: - type: optional - docs: >- - The supplemental language model associated with this Config. - - - This model is used to generate longer, more detailed responses from - EVI. Choosing an appropriate supplemental language model for your use - case is crucial for generating fast, high-quality responses from EVI. - builtin_tools: - type: optional>> - docs: List of built-in tools associated with this Config. - evi_version: - type: optional - docs: >- - Specifies the EVI version to use. See our [EVI Version - Guide](/docs/speech-to-speech-evi/configuration/evi-version) for - differences between versions. - - - **We're officially sunsetting EVI versions 1 and 2 on August 30, - 2025**. To keep things running smoothly, be sure to [migrate to EVI - 3](/docs/speech-to-speech-evi/configuration/evi-version#migrating-to-evi-3) - before then. - timeouts: optional - nudges: optional - event_messages: optional - ellm_model: - type: optional + of the Tool. Each update to the Tool increments its version number. + source: + openapi: evi-openapi.json + PostedWebhookEventType: + enum: + - chat_started + - chat_ended + - tool_call + docs: Events this URL is subscribed to + inline: true + source: + openapi: evi-openapi.json + PostedWebhookSpec: + docs: URL and settings for a specific webhook to be posted to the server + properties: + events: docs: >- - The eLLM setup associated with this Config. + The list of events the specified URL is subscribed to. - Hume's eLLM (empathic Large Language Model) is a multimodal language - model that takes into account both expression measures and language. - The eLLM generates short, empathic language responses and guides - text-to-speech (TTS) prosody. - voice: - type: optional - docs: A voice specification associated with this Config. - prompt: optional - webhooks: - type: optional>> - docs: Map of webhooks associated with this config. - created_on: - type: optional - docs: >- - Time at which the Config was created. Measured in seconds since the - Unix epoch. - modified_on: - type: optional + See our [webhooks + guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) + for more information on supported events. + type: list + url: + type: string docs: >- - Time at which the Config was last modified. Measured in seconds since - the Unix epoch. - version_description: - type: optional - docs: An optional description of the Config version. - tools: - type: optional>> - docs: List of user-defined tools associated with this Config. + The URL where event payloads will be sent. This must be a valid https + URL to ensure secure communication. The server at this URL must accept + POST requests with a JSON payload. source: openapi: evi-openapi.json - ReturnPagedChatsPaginationDirection: + ReturnBuiltinToolToolType: enum: - - ASC - - DESC + - BUILTIN + - FUNCTION docs: >- - Indicates the order in which the paginated results are presented, based on - their creation date. - - - It shows `ASC` for ascending order (chronological, with the oldest records - first) or `DESC` for descending order (reverse-chronological, with the - newest records first). This value corresponds to the `ascending_order` - query parameter used in the request. + Type of Tool. Either `BUILTIN` for natively implemented tools, like web + search, or `FUNCTION` for user-defined tools. inline: true source: openapi: evi-openapi.json - ReturnPagedChats: - docs: A paginated list of chats returned from the server + ReturnBuiltinTool: + docs: A specific builtin tool version returned from the server properties: - page_number: - type: integer - docs: >- - The page number of the returned list. - - - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: integer - docs: >- - The maximum number of items returned per page. - - - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. - pagination_direction: - type: ReturnPagedChatsPaginationDirection + fallback_content: + type: optional docs: >- - Indicates the order in which the paginated results are presented, - based on their creation date. - - - It shows `ASC` for ascending order (chronological, with the oldest - records first) or `DESC` for descending order (reverse-chronological, - with the newest records first). This value corresponds to the - `ascending_order` query parameter used in the request. - chats_page: + Optional text passed to the supplemental LLM in place of the tool call + result. The LLM then uses this text to generate a response back to the + user, ensuring continuity in the conversation if the Tool errors. + name: + type: string + docs: Name applied to all versions of a particular Tool. + tool_type: + type: ReturnBuiltinToolToolType docs: >- - List of Chats and their metadata returned for the specified - `page_number` and `page_size`. - type: list + Type of Tool. Either `BUILTIN` for natively implemented tools, like + web search, or `FUNCTION` for user-defined tools. source: openapi: evi-openapi.json - ReturnChatPagedEventsStatus: + ReturnChatStatus: enum: - ACTIVE - USER_ENDED @@ -1922,37 +2017,36 @@ types: inline: true source: openapi: evi-openapi.json - ReturnChatPagedEventsPaginationDirection: - enum: - - ASC - - DESC - docs: >- - Indicates the order in which the paginated results are presented, based on - their creation date. - - - It shows `ASC` for ascending order (chronological, with the oldest records - first) or `DESC` for descending order (reverse-chronological, with the - newest records first). This value corresponds to the `ascending_order` - query parameter used in the request. - inline: true - source: - openapi: evi-openapi.json - ReturnChatPagedEvents: - docs: >- - A description of chat status with a paginated list of chat events returned - from the server + ReturnChat: + docs: A description of chat and its status properties: - id: - type: string - docs: Identifier for a Chat. Formatted as a UUID. chat_group_id: type: string docs: >- Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. + config: optional + end_timestamp: + type: optional + docs: >- + Time at which the Chat ended. Measured in seconds since the Unix + epoch. + event_count: + type: optional + docs: The total number of events currently in this chat. + id: + type: string + docs: Identifier for a Chat. Formatted as a UUID. + metadata: + type: optional + docs: Stringified JSON with additional metadata about the chat. + start_timestamp: + type: long + docs: >- + Time at which the Chat started. Measured in seconds since the Unix + epoch. status: - type: ReturnChatPagedEventsStatus + type: ReturnChatStatus docs: >- Indicates the current state of the chat. There are six possible statuses: @@ -1975,134 +2069,194 @@ types: - `ERROR`: The chat ended unexpectedly due to an error. - start_timestamp: - type: long - docs: >- - Time at which the Chat started. Measured in seconds since the Unix - epoch. - end_timestamp: - type: optional - docs: >- - Time at which the Chat ended. Measured in seconds since the Unix - epoch. - pagination_direction: - type: ReturnChatPagedEventsPaginationDirection - docs: >- - Indicates the order in which the paginated results are presented, - based on their creation date. - - - It shows `ASC` for ascending order (chronological, with the oldest - records first) or `DESC` for descending order (reverse-chronological, - with the newest records first). This value corresponds to the - `ascending_order` query parameter used in the request. - events_page: - docs: List of Chat Events for the specified `page_number` and `page_size`. - type: list - metadata: - type: optional - docs: Stringified JSON with additional metadata about the chat. - page_number: - type: integer - docs: >- - The page number of the returned list. + source: + openapi: evi-openapi.json + ReturnChatEventRole: + enum: + - USER + - AGENT + - SYSTEM + - TOOL + docs: >- + The role of the entity which generated the Chat Event. There are four + possible values: + - `USER`: The user, capable of sending user messages and interruptions. - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: integer - docs: >- - The maximum number of items returned per page. + - `AGENT`: The assistant, capable of sending agent messages. + - `SYSTEM`: The backend server, capable of transmitting errors. - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. - config: optional + - `TOOL`: The function calling mechanism. + inline: true source: openapi: evi-openapi.json - ReturnChatAudioReconstructionStatus: + ReturnChatEventType: enum: - - QUEUED - - IN_PROGRESS - - COMPLETE - - ERROR - - CANCELLED + - FUNCTION_CALL + - FUNCTION_CALL_RESPONSE + - CHAT_END_MESSAGE + - AGENT_MESSAGE + - SYSTEM_PROMPT + - USER_RECORDING_START_MESSAGE + - RESUME_ONSET + - USER_INTERRUPTION + - CHAT_START_MESSAGE + - PAUSE_ONSET + - USER_MESSAGE docs: >- - Indicates the current state of the audio reconstruction job. There are - five possible statuses: + Type of Chat Event. There are eleven Chat Event types: + - `SYSTEM_PROMPT`: The system prompt used to initialize the session. - - `QUEUED`: The reconstruction job is waiting to be processed. + - `CHAT_START_MESSAGE`: Marks the beginning of the chat session. + - `USER_RECORDING_START_MESSAGE`: Marks when the client began streaming + audio and the start of audio processing. - - `IN_PROGRESS`: The reconstruction is currently being processed. + - `USER_MESSAGE`: A message sent by the user. + - `USER_INTERRUPTION`: A user-initiated interruption while the assistant + is speaking. - - `COMPLETE`: The audio reconstruction is finished and ready for download. + - `AGENT_MESSAGE`: A response generated by the assistant. + - `FUNCTION_CALL`: A record of a tool invocation by the assistant. - - `ERROR`: An error occurred during the reconstruction process. + - `FUNCTION_CALL_RESPONSE`: The result of a previously invoked function or + tool. + + - `PAUSE_ONSET`: Marks when the client sent a `pause_assistant_message` to + pause the assistant. + - `RESUME_ONSET`: Marks when the client sent a `resume_assistant_message` + to resume the assistant. - - `CANCELED`: The reconstruction job has been canceled. + - `CHAT_END_MESSAGE`: Indicates the end of the chat session. inline: true source: openapi: evi-openapi.json - ReturnChatAudioReconstruction: - docs: >- - List of chat audio reconstructions returned for the specified page number - and page size. + ReturnChatEvent: + docs: A description of a single event in a chat returned from the server properties: - id: + chat_id: type: string - docs: Identifier for the chat. Formatted as a UUID. - user_id: + docs: Identifier for the Chat this event occurred in. Formatted as a UUID. + emotion_features: + type: optional + docs: >- + Stringified JSON containing the prosody model inference results. + + + EVI uses the prosody model to measure 48 expressions related to speech + and vocal characteristics. These results contain a detailed emotional + and tonal analysis of the audio. Scores typically range from 0 to 1, + with higher values indicating a stronger confidence level in the + measured attribute. + id: type: string - docs: Identifier for the user that owns this chat. Formatted as a UUID. - status: - type: ReturnChatAudioReconstructionStatus + docs: Identifier for a Chat Event. Formatted as a UUID. + message_text: + type: optional docs: >- - Indicates the current state of the audio reconstruction job. There are - five possible statuses: + The text of the Chat Event. This field contains the message content + for each event type listed in the `type` field. + metadata: + type: optional + docs: Stringified JSON with additional metadata about the chat event. + related_event_id: + type: optional + docs: >- + Identifier for a related chat event. Currently only seen on + ASSISTANT_PROSODY events, to point back to the ASSISTANT_MESSAGE that + generated these prosody scores + role: + type: ReturnChatEventRole + docs: >- + The role of the entity which generated the Chat Event. There are four + possible values: + - `USER`: The user, capable of sending user messages and + interruptions. - - `QUEUED`: The reconstruction job is waiting to be processed. + - `AGENT`: The assistant, capable of sending agent messages. + - `SYSTEM`: The backend server, capable of transmitting errors. - - `IN_PROGRESS`: The reconstruction is currently being processed. + - `TOOL`: The function calling mechanism. + timestamp: + type: long + docs: >- + Time at which the Chat Event occurred. Measured in seconds since the + Unix epoch. + type: + type: ReturnChatEventType + docs: >- + Type of Chat Event. There are eleven Chat Event types: + - `SYSTEM_PROMPT`: The system prompt used to initialize the session. - - `COMPLETE`: The audio reconstruction is finished and ready for - download. + - `CHAT_START_MESSAGE`: Marks the beginning of the chat session. + - `USER_RECORDING_START_MESSAGE`: Marks when the client began + streaming audio and the start of audio processing. - - `ERROR`: An error occurred during the reconstruction process. + - `USER_MESSAGE`: A message sent by the user. + - `USER_INTERRUPTION`: A user-initiated interruption while the + assistant is speaking. - - `CANCELED`: The reconstruction job has been canceled. - filename: - type: optional - docs: Name of the chat audio reconstruction file. - modified_at: - type: optional + - `AGENT_MESSAGE`: A response generated by the assistant. + + - `FUNCTION_CALL`: A record of a tool invocation by the assistant. + + - `FUNCTION_CALL_RESPONSE`: The result of a previously invoked + function or tool. + + - `PAUSE_ONSET`: Marks when the client sent a + `pause_assistant_message` to pause the assistant. + + - `RESUME_ONSET`: Marks when the client sent a + `resume_assistant_message` to resume the assistant. + + - `CHAT_END_MESSAGE`: Indicates the end of the chat session. + source: + openapi: evi-openapi.json + ReturnChatGroup: + docs: A description of chat_group and its status + properties: + active: + type: optional docs: >- - The timestamp of the most recent status change for this audio - reconstruction, formatted milliseconds since the Unix epoch. - signed_audio_url: + Denotes whether there is an active Chat associated with this Chat + Group. + first_start_timestamp: + type: long + docs: >- + Time at which the first Chat in this Chat Group was created. Measured + in seconds since the Unix epoch. + id: + type: string + docs: >- + Identifier for the Chat Group. Any Chat resumed from this Chat Group + will have the same `chat_group_id`. Formatted as a UUID. + most_recent_chat_id: type: optional - docs: Signed URL used to download the chat audio reconstruction file. - signed_url_expiration_timestamp_millis: - type: optional docs: >- - The timestamp when the signed URL will expire, formatted as a Unix - epoch milliseconds. + The `chat_id` of the most recent Chat in this Chat Group. Formatted as + a UUID. + most_recent_config: optional + most_recent_start_timestamp: + type: long + docs: >- + Time at which the most recent Chat in this Chat Group was created. + Measured in seconds since the Unix epoch. + num_chats: + type: integer + docs: The total number of Chats in this Chat Group. source: openapi: evi-openapi.json - ReturnPagedChatGroupsPaginationDirection: + ReturnChatGroupPagedAudioReconstructionsPaginationDirection: enum: - ASC - DESC @@ -2118,9 +2272,20 @@ types: inline: true source: openapi: evi-openapi.json - ReturnPagedChatGroups: - docs: A paginated list of chat_groups returned from the server + ReturnChatGroupPagedAudioReconstructions: + docs: A paginated list of chat reconstructions for a particular chatgroup properties: + audio_reconstructions_page: + docs: >- + List of chat audio reconstructions returned for the specified page + number and page size. + type: list + id: + type: string + docs: Identifier for the chat group. Formatted as a UUID. + num_chats: + type: integer + docs: Total number of chats in this chatgroup page_number: type: integer docs: >- @@ -2137,11 +2302,8 @@ types: This value corresponds to the `page_size` parameter specified in the request. - total_pages: - type: integer - docs: The total number of pages in the collection. pagination_direction: - type: ReturnPagedChatGroupsPaginationDirection + type: ReturnChatGroupPagedAudioReconstructionsPaginationDirection docs: >- Indicates the order in which the paginated results are presented, based on their creation date. @@ -2151,11 +2313,12 @@ types: records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. - chat_groups_page: - docs: >- - List of Chat Groups and their metadata returned for the specified - `page_number` and `page_size`. - type: list + total_pages: + type: integer + docs: The total number of pages in the collection. + user_id: + type: string + docs: Identifier for the user that owns this chat. Formatted as a UUID. source: openapi: evi-openapi.json ReturnChatGroupPagedChatsPaginationDirection: @@ -2179,16 +2342,24 @@ types: A description of chat_group and its status with a paginated list of each chat in the chat_group properties: - id: - type: string + active: + type: optional docs: >- - Identifier for the Chat Group. Any Chat resumed from this Chat Group - will have the same `chat_group_id`. Formatted as a UUID. + Denotes whether there is an active Chat associated with this Chat + Group. + chats_page: + docs: List of Chats for the specified `page_number` and `page_size`. + type: list first_start_timestamp: type: long docs: >- Time at which the first Chat in this Chat Group was created. Measured in seconds since the Unix epoch. + id: + type: string + docs: >- + Identifier for the Chat Group. Any Chat resumed from this Chat Group + will have the same `chat_group_id`. Formatted as a UUID. most_recent_start_timestamp: type: long docs: >- @@ -2213,9 +2384,6 @@ types: This value corresponds to the `page_size` parameter specified in the request. - total_pages: - type: integer - docs: The total number of pages in the collection. pagination_direction: type: ReturnChatGroupPagedChatsPaginationDirection docs: >- @@ -2227,14 +2395,9 @@ types: records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. - chats_page: - docs: List of Chats for the specified `page_number` and `page_size`. - type: list - active: - type: optional - docs: >- - Denotes whether there is an active Chat associated with this Chat - Group. + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json ReturnChatGroupPagedEventsPaginationDirection: @@ -2258,6 +2421,9 @@ types: A paginated list of chat events that occurred across chats in this chat_group from the server properties: + events_page: + docs: List of Chat Events for the specified `page_number` and `page_size`. + type: list id: type: string docs: >- @@ -2279,9 +2445,6 @@ types: This value corresponds to the `page_size` parameter specified in the request. - total_pages: - type: integer - docs: The total number of pages in the collection. pagination_direction: type: ReturnChatGroupPagedEventsPaginationDirection docs: >- @@ -2293,12 +2456,12 @@ types: records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. - events_page: - docs: List of Chat Events for the specified `page_number` and `page_size`. - type: list + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - ReturnChatGroupPagedAudioReconstructionsPaginationDirection: + ReturnChatPagedEventsPaginationDirection: enum: - ASC - DESC @@ -2314,39 +2477,81 @@ types: inline: true source: openapi: evi-openapi.json - ReturnChatGroupPagedAudioReconstructions: - docs: A paginated list of chat reconstructions for a particular chatgroup - properties: - id: - type: string - docs: Identifier for the chat group. Formatted as a UUID. - user_id: - type: string - docs: Identifier for the user that owns this chat. Formatted as a UUID. - num_chats: - type: integer - docs: Total number of chats in this chatgroup - page_number: - type: integer - docs: >- - The page number of the returned list. + ReturnChatPagedEventsStatus: + enum: + - ACTIVE + - USER_ENDED + - USER_TIMEOUT + - MAX_DURATION_TIMEOUT + - INACTIVITY_TIMEOUT + - ERROR + docs: >- + Indicates the current state of the chat. There are six possible statuses: - This value corresponds to the `page_number` parameter specified in the - request. Pagination uses zero-based indexing. - page_size: - type: integer - docs: >- - The maximum number of items returned per page. + - `ACTIVE`: The chat is currently active and ongoing. - This value corresponds to the `page_size` parameter specified in the - request. - total_pages: - type: integer - docs: The total number of pages in the collection. + - `USER_ENDED`: The chat was manually ended by the user. + + + - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. + + + - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the maximum + allowed duration. + + + - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. + + + - `ERROR`: The chat ended unexpectedly due to an error. + inline: true + source: + openapi: evi-openapi.json + ReturnChatPagedEvents: + docs: >- + A description of chat status with a paginated list of chat events returned + from the server + properties: + chat_group_id: + type: string + docs: >- + Identifier for the Chat Group. Any chat resumed from this Chat will + have the same `chat_group_id`. Formatted as a UUID. + config: optional + end_timestamp: + type: optional + docs: >- + Time at which the Chat ended. Measured in seconds since the Unix + epoch. + events_page: + docs: List of Chat Events for the specified `page_number` and `page_size`. + type: list + id: + type: string + docs: Identifier for a Chat. Formatted as a UUID. + metadata: + type: optional + docs: Stringified JSON with additional metadata about the chat. + page_number: + type: integer + docs: >- + The page number of the returned list. + + + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: integer + docs: >- + The maximum number of items returned per page. + + + This value corresponds to the `page_size` parameter specified in the + request. pagination_direction: - type: ReturnChatGroupPagedAudioReconstructionsPaginationDirection + type: ReturnChatPagedEventsPaginationDirection docs: >- Indicates the order in which the paginated results are presented, based on their creation date. @@ -2356,142 +2561,138 @@ types: records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. - audio_reconstructions_page: + start_timestamp: + type: long docs: >- - List of chat audio reconstructions returned for the specified page - number and page size. - type: list - source: - openapi: evi-openapi.json - ReturnPromptVersionType: - enum: - - FIXED - - LATEST - docs: >- - Versioning method for a Prompt. Either `FIXED` for using a fixed version - number or `LATEST` for auto-updating to the latest version. - inline: true + Time at which the Chat started. Measured in seconds since the Unix + epoch. + status: + type: ReturnChatPagedEventsStatus + docs: >- + Indicates the current state of the chat. There are six possible + statuses: + + + - `ACTIVE`: The chat is currently active and ongoing. + + + - `USER_ENDED`: The chat was manually ended by the user. + + + - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. + + + - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the + maximum allowed duration. + + + - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. + + + - `ERROR`: The chat ended unexpectedly due to an error. + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - PostedConfigPromptSpec: - docs: >- - Identifies which prompt to use in a a config OR how to create a new prompt - to use in the config + ReturnConfig: + docs: A specific config version returned from the server properties: + builtin_tools: + type: optional>> + docs: List of built-in tools associated with this config + created_on: + type: optional + docs: The timestamp when the first version of this config was created. + ellm_model: optional + event_messages: optional + evi_version: + type: optional + docs: The version of the EVI used with this config. id: type: optional - docs: Identifier for a Prompt. Formatted as a UUID. + docs: Identifier for a Config. Formatted as a UUID. + language_model: optional + modified_on: + type: optional + docs: The timestamp when this version of the config was created. + name: + type: optional + docs: Name applied to all versions of a particular Config. + nudges: optional + prompt: optional + timeouts: optional + tools: + type: optional>> + docs: List of user-defined tools associated with this config. version: type: optional docs: >- - Version number for a Prompt. Version numbers should be integers. The + Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. - text: + version_description: type: optional - docs: Text used to create a new prompt for a particular config. - source: - openapi: evi-openapi.json - PostedLanguageModel: - docs: A LanguageModel to be posted to the server - properties: - model_provider: - type: optional - docs: The provider of the supplemental language model. - model_resource: - type: optional - docs: String that specifies the language model to use with `model_provider`. - temperature: - type: optional - docs: >- - The model temperature, with values between 0 to 1 (inclusive). - - - Controls the randomness of the LLM's output, with values closer to 0 - yielding focused, deterministic responses and values closer to 1 - producing more creative, diverse responses. - source: - openapi: evi-openapi.json - PostedEllmModel: - docs: A eLLM model configuration to be posted to the server - properties: - allow_short_responses: - type: optional - docs: |- - Boolean indicating if the eLLM is allowed to generate short responses. - - If omitted, short responses from the eLLM are enabled by default. + docs: Description that is appended to a specific version of a Config. + voice: optional + webhooks: + type: optional>> + docs: Map of webhooks associated with this config. source: openapi: evi-openapi.json - PostedUserDefinedToolSpec: - docs: A specific tool identifier to be posted to the server + ReturnConfigSpec: + docs: The Config associated with this Chat. properties: id: type: string - docs: Identifier for a Tool. Formatted as a UUID. + docs: Identifier for a Config. Formatted as a UUID. version: type: optional docs: >- - Version number for a Tool. + Version number for a Config. - Tools, Configs, Custom Voices, and Prompts are versioned. This + Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to - progressively refine tools and revert to previous versions if needed. + progressively refine configurations and revert to previous versions if + needed. Version numbers are integer values representing different iterations - of the Tool. Each update to the Tool increments its version number. + of the Config. Each update to the Config increments its version + number. source: openapi: evi-openapi.json - PostedBuiltinToolName: - enum: - - web_search - - hang_up - docs: >- - Name of the built-in tool to use. Hume supports the following built-in - tools: - - - - **web_search:** enables EVI to search the web for up-to-date information - when applicable. - - - **hang_up:** closes the WebSocket connection when appropriate (e.g., - after detecting a farewell in the conversation). - + ReturnEllmModel: + docs: A specific eLLM Model configuration + properties: + allow_short_responses: + type: boolean + docs: |- + Boolean indicating if the eLLM is allowed to generate short responses. - For more information, see our guide on [using built-in - tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). - inline: true + If omitted, short responses from the eLLM are enabled by default. source: openapi: evi-openapi.json - PostedBuiltinTool: - docs: A configuration of a built-in tool to be posted to the server + ReturnEventMessageSpec: + docs: A specific event message configuration to be returned from the server properties: - name: - type: PostedBuiltinToolName + enabled: + type: boolean docs: >- - Name of the built-in tool to use. Hume supports the following built-in - tools: - - - - **web_search:** enables EVI to search the web for up-to-date - information when applicable. - - - **hang_up:** closes the WebSocket connection when appropriate (e.g., - after detecting a farewell in the conversation). + Boolean indicating if this event message is enabled. - For more information, see our guide on [using built-in - tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). - fallback_content: + If set to `true`, a message will be sent when the circumstances for + the specific event are met. + text: type: optional docs: >- - Optional text passed to the supplemental LLM in place of the tool call - result. The LLM then uses this text to generate a response back to the - user, ensuring continuity in the conversation if the Tool errors. + Text to use as the event message when the corresponding event occurs. + If no text is specified, EVI will generate an appropriate message + based on its current context and the system prompt. source: openapi: evi-openapi.json - PostedEventMessageSpecs: + ReturnEventMessageSpecs: docs: >- Collection of event messages returned by the server. @@ -2500,13 +2701,8 @@ types: chat session. These messages are used to configure behaviors for EVI, such as controlling how EVI starts a new conversation. properties: - on_new_chat: - type: optional - docs: >- - Specifies the initial message EVI provides when a new chat is started, - such as a greeting or welcome message. on_inactivity_timeout: - type: optional + type: optional docs: >- Specifies the message EVI provides when the chat is about to be disconnected due to a user inactivity timeout, such as a message @@ -2527,677 +2723,459 @@ types: However, if the inactivity message is not enabled, then reaching the inactivity timeout will immediately end the connection. on_max_duration_timeout: - type: optional + type: optional docs: >- Specifies the message EVI provides when the chat is disconnected due to reaching the maximum chat duration, such as a message mentioning the time limit for the chat has been reached. + on_new_chat: + type: optional + docs: >- + Specifies the initial message EVI provides when a new chat is started, + such as a greeting or welcome message. source: openapi: evi-openapi.json - PostedNudgeSpec: - docs: A nudge specification posted to the server + ReturnLanguageModel: + docs: A specific LanguageModel properties: - enabled: - type: optional + model_provider: + type: optional + docs: The provider of the supplemental language model. + model_resource: + type: optional + docs: String that specifies the language model to use with `model_provider`. + temperature: + type: optional docs: >- - If true, EVI will 'nudge' the user to speak after a determined - interval of silence. + The model temperature, with values between 0 to 1 (inclusive). + + + Controls the randomness of the LLM's output, with values closer to 0 + yielding focused, deterministic responses and values closer to 1 + producing more creative, diverse responses. + source: + openapi: evi-openapi.json + ReturnNudgeSpec: + docs: A specific nudge configuration returned from the server + properties: + enabled: + type: boolean + docs: EVI will nudge user after inactivity interval_secs: type: optional - docs: The interval of inactivity (in seconds) before a nudge is triggered. + docs: Time interval in seconds after which the nudge will be sent. source: openapi: evi-openapi.json - PostedTimeoutSpecsInactivity: + ReturnPagedChatGroupsPaginationDirection: + enum: + - ASC + - DESC docs: >- - Specifies the duration of user inactivity (in seconds) after which the EVI - WebSocket connection will be automatically disconnected. Default is 600 - seconds (10 minutes). + Indicates the order in which the paginated results are presented, based on + their creation date. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. + It shows `ASC` for ascending order (chronological, with the oldest records + first) or `DESC` for descending order (reverse-chronological, with the + newest records first). This value corresponds to the `ascending_order` + query parameter used in the request. + inline: true + source: + openapi: evi-openapi.json + ReturnPagedChatGroups: + docs: A paginated list of chat_groups returned from the server properties: - duration_secs: - type: optional + chat_groups_page: docs: >- - Duration in seconds for the timeout (e.g. 600 seconds represents 10 - minutes). - enabled: - type: boolean + List of Chat Groups and their metadata returned for the specified + `page_number` and `page_size`. + type: list + page_number: + type: integer docs: >- - Boolean indicating if this timeout is enabled. + The page number of the returned list. - If set to false, EVI will not timeout due to a specified duration of - user inactivity being reached. However, the conversation will - eventually disconnect after 1,800 seconds (30 minutes), which is the - maximum WebSocket duration limit for EVI. - source: - openapi: evi-openapi.json - inline: true - PostedTimeoutSpecsMaxDuration: - docs: >- - Specifies the maximum allowed duration (in seconds) for an EVI WebSocket - connection before it is automatically disconnected. Default is 1,800 - seconds (30 minutes). + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: integer + docs: >- + The maximum number of items returned per page. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. - properties: - duration_secs: - type: optional - docs: >- - Duration in seconds for the timeout (e.g. 600 seconds represents 10 - minutes). - enabled: - type: boolean + This value corresponds to the `page_size` parameter specified in the + request. + pagination_direction: + type: ReturnPagedChatGroupsPaginationDirection docs: >- - Boolean indicating if this timeout is enabled. + Indicates the order in which the paginated results are presented, + based on their creation date. - If set to false, EVI will not timeout due to a specified maximum - duration being reached. However, the conversation will eventually - disconnect after 1,800 seconds (30 minutes), which is the maximum - WebSocket duration limit for EVI. + It shows `ASC` for ascending order (chronological, with the oldest + records first) or `DESC` for descending order (reverse-chronological, + with the newest records first). This value corresponds to the + `ascending_order` query parameter used in the request. + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - inline: true - PostedTimeoutSpecs: + ReturnPagedChatsPaginationDirection: + enum: + - ASC + - DESC docs: >- - Collection of timeout specifications returned by the server. + Indicates the order in which the paginated results are presented, based on + their creation date. - Timeouts are sent by the server when specific time-based events occur - during a chat session. These specifications set the inactivity timeout and - the maximum duration an EVI WebSocket connection can stay open before it - is automatically disconnected. + It shows `ASC` for ascending order (chronological, with the oldest records + first) or `DESC` for descending order (reverse-chronological, with the + newest records first). This value corresponds to the `ascending_order` + query parameter used in the request. + inline: true + source: + openapi: evi-openapi.json + ReturnPagedChats: + docs: A paginated list of chats returned from the server properties: - inactivity: - type: optional + chats_page: docs: >- - Specifies the duration of user inactivity (in seconds) after which the - EVI WebSocket connection will be automatically disconnected. Default - is 600 seconds (10 minutes). + List of Chats and their metadata returned for the specified + `page_number` and `page_size`. + type: list + page_number: + type: integer + docs: >- + The page number of the returned list. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. - max_duration: - type: optional + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: integer docs: >- - Specifies the maximum allowed duration (in seconds) for an EVI - WebSocket connection before it is automatically disconnected. Default - is 1,800 seconds (30 minutes). + The maximum number of items returned per page. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. - source: - openapi: evi-openapi.json - PostedWebhookEventType: - enum: - - chat_started - - chat_ended - docs: Events this URL is subscribed to - inline: true + This value corresponds to the `page_size` parameter specified in the + request. + pagination_direction: + type: ReturnPagedChatsPaginationDirection + docs: >- + Indicates the order in which the paginated results are presented, + based on their creation date. + + + It shows `ASC` for ascending order (chronological, with the oldest + records first) or `DESC` for descending order (reverse-chronological, + with the newest records first). This value corresponds to the + `ascending_order` query parameter used in the request. + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - PostedWebhookSpec: - docs: URL and settings for a specific webhook to be posted to the server + ReturnPagedConfigs: + docs: A paginated list of config versions returned from the server properties: - url: - type: string + configs_page: + type: optional> docs: >- - The URL where event payloads will be sent. This must be a valid https - URL to ensure secure communication. The server at this URL must accept - POST requests with a JSON payload. - events: + List of configs returned for the specified `page_number` and + `page_size`. + page_number: + type: optional docs: >- - The list of events the specified URL is subscribed to. + The page number of the returned list. - See our [webhooks - guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) - for more information on supported events. - type: list - source: - openapi: evi-openapi.json - ReturnLanguageModel: - docs: A specific LanguageModel - properties: - model_provider: - type: optional - docs: The provider of the supplemental language model. - model_resource: - type: optional - docs: String that specifies the language model to use with `model_provider`. - temperature: - type: optional + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: optional docs: >- - The model temperature, with values between 0 to 1 (inclusive). + The maximum number of items returned per page. - Controls the randomness of the LLM's output, with values closer to 0 - yielding focused, deterministic responses and values closer to 1 - producing more creative, diverse responses. + This value corresponds to the `page_size` parameter specified in the + request. + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - ReturnEllmModel: - docs: A specific eLLM Model configuration + ReturnPagedPrompts: + docs: A paginated list of prompt versions returned from the server properties: - allow_short_responses: - type: boolean - docs: |- - Boolean indicating if the eLLM is allowed to generate short responses. + page_number: + type: integer + docs: >- + The page number of the returned list. - If omitted, short responses from the eLLM are enabled by default. - source: - openapi: evi-openapi.json - ReturnBuiltinToolToolType: - enum: - - BUILTIN - - FUNCTION - docs: >- - Type of Tool. Either `BUILTIN` for natively implemented tools, like web - search, or `FUNCTION` for user-defined tools. - inline: true - source: - openapi: evi-openapi.json - ReturnBuiltinTool: - docs: A specific builtin tool version returned from the server - properties: - tool_type: - type: ReturnBuiltinToolToolType - docs: >- - Type of Tool. Either `BUILTIN` for natively implemented tools, like - web search, or `FUNCTION` for user-defined tools. - name: - type: string - docs: Name applied to all versions of a particular Tool. - fallback_content: - type: optional - docs: >- - Optional text passed to the supplemental LLM in place of the tool call - result. The LLM then uses this text to generate a response back to the - user, ensuring continuity in the conversation if the Tool errors. - source: - openapi: evi-openapi.json - ReturnEventMessageSpecs: - docs: >- - Collection of event messages returned by the server. - - Event messages are sent by the server when specific events occur during a - chat session. These messages are used to configure behaviors for EVI, such - as controlling how EVI starts a new conversation. - properties: - on_new_chat: - type: optional - docs: >- - Specifies the initial message EVI provides when a new chat is started, - such as a greeting or welcome message. - on_inactivity_timeout: - type: optional + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: integer docs: >- - Specifies the message EVI provides when the chat is about to be - disconnected due to a user inactivity timeout, such as a message - mentioning a lack of user input for a period of time. - - - Enabling an inactivity message allows developers to use this message - event for "checking in" with the user if they are not responding to - see if they are still active. - - - If the user does not respond in the number of seconds specified in the - `inactivity_timeout` field, then EVI will say the message and the user - has 15 seconds to respond. If they respond in time, the conversation - will continue; if not, the conversation will end. + The maximum number of items returned per page. - However, if the inactivity message is not enabled, then reaching the - inactivity timeout will immediately end the connection. - on_max_duration_timeout: - type: optional + This value corresponds to the `page_size` parameter specified in the + request. + prompts_page: docs: >- - Specifies the message EVI provides when the chat is disconnected due - to reaching the maximum chat duration, such as a message mentioning - the time limit for the chat has been reached. + List of prompts returned for the specified `page_number` and + `page_size`. + type: list> + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - ReturnTimeoutSpecs: - docs: >- - Collection of timeout specifications returned by the server. - - - Timeouts are sent by the server when specific time-based events occur - during a chat session. These specifications set the inactivity timeout and - the maximum duration an EVI WebSocket connection can stay open before it - is automatically disconnected. + ReturnPagedUserDefinedTools: + docs: A paginated list of user defined tool versions returned from the server properties: - inactivity: - type: ReturnTimeoutSpec + page_number: + type: integer docs: >- - Specifies the duration of user inactivity (in seconds) after which the - EVI WebSocket connection will be automatically disconnected. Default - is 600 seconds (10 minutes). + The page number of the returned list. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. - max_duration: - type: ReturnTimeoutSpec + This value corresponds to the `page_number` parameter specified in the + request. Pagination uses zero-based indexing. + page_size: + type: integer docs: >- - Specifies the maximum allowed duration (in seconds) for an EVI - WebSocket connection before it is automatically disconnected. Default - is 1,800 seconds (30 minutes). + The maximum number of items returned per page. - Accepts a minimum value of 30 seconds and a maximum value of 1,800 - seconds. - source: - openapi: evi-openapi.json - ReturnNudgeSpec: - docs: A specific nudge configuration returned from the server - properties: - enabled: - type: boolean - docs: EVI will nudge user after inactivity - interval_secs: - type: optional - docs: Time interval in seconds after which the nudge will be sent. - source: - openapi: evi-openapi.json - ReturnWebhookEventType: - enum: - - chat_started - - chat_ended - docs: Events this URL is subscribed to - inline: true - source: - openapi: evi-openapi.json - ReturnWebhookSpec: - docs: Collection of webhook URL endpoints to be returned from the server - properties: - url: - type: string - docs: >- - The URL where event payloads will be sent. This must be a valid https - URL to ensure secure communication. The server at this URL must accept - POST requests with a JSON payload. - events: + This value corresponds to the `page_size` parameter specified in the + request. + tools_page: docs: >- - The list of events the specified URL is subscribed to. - - - See our [webhooks - guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) - for more information on supported events. - type: list + List of tools returned for the specified `page_number` and + `page_size`. + type: list> + total_pages: + type: integer + docs: The total number of pages in the collection. source: openapi: evi-openapi.json - ReturnChatStatus: + ReturnPromptVersionType: enum: - - ACTIVE - - USER_ENDED - - USER_TIMEOUT - - MAX_DURATION_TIMEOUT - - INACTIVITY_TIMEOUT - - ERROR + - FIXED + - LATEST docs: >- - Indicates the current state of the chat. There are six possible statuses: - - - - `ACTIVE`: The chat is currently active and ongoing. - - - - `USER_ENDED`: The chat was manually ended by the user. - - - - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. - - - - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the maximum - allowed duration. - - - - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. - - - - `ERROR`: The chat ended unexpectedly due to an error. + Versioning method for a Prompt. Either `FIXED` for using a fixed version + number or `LATEST` for auto-updating to the latest version. inline: true source: openapi: evi-openapi.json - ReturnChat: - docs: A description of chat and its status + ReturnPrompt: + docs: A specific prompt version returned from the server properties: - id: - type: string - docs: Identifier for a Chat. Formatted as a UUID. - chat_group_id: - type: string - docs: >- - Identifier for the Chat Group. Any chat resumed from this Chat will - have the same `chat_group_id`. Formatted as a UUID. - status: - type: ReturnChatStatus - docs: >- - Indicates the current state of the chat. There are six possible - statuses: - - - - `ACTIVE`: The chat is currently active and ongoing. - - - - `USER_ENDED`: The chat was manually ended by the user. - - - - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. - - - - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the - maximum allowed duration. - - - - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. - - - - `ERROR`: The chat ended unexpectedly due to an error. - start_timestamp: + created_on: type: long - docs: >- - Time at which the Chat started. Measured in seconds since the Unix - epoch. - end_timestamp: - type: optional - docs: >- - Time at which the Chat ended. Measured in seconds since the Unix - epoch. - event_count: - type: optional - docs: The total number of events currently in this chat. - metadata: - type: optional - docs: Stringified JSON with additional metadata about the chat. - config: optional - source: - openapi: evi-openapi.json - ReturnChatEventRole: - enum: - - USER - - AGENT - - SYSTEM - - TOOL - docs: >- - The role of the entity which generated the Chat Event. There are four - possible values: - - - `USER`: The user, capable of sending user messages and interruptions. - - - `AGENT`: The assistant, capable of sending agent messages. - - - `SYSTEM`: The backend server, capable of transmitting errors. - - - `TOOL`: The function calling mechanism. - inline: true - source: - openapi: evi-openapi.json - ReturnChatEventType: - enum: - - FUNCTION_CALL - - FUNCTION_CALL_RESPONSE - - CHAT_END_MESSAGE - - AGENT_MESSAGE - - SYSTEM_PROMPT - - USER_RECORDING_START_MESSAGE - - RESUME_ONSET - - USER_INTERRUPTION - - CHAT_START_MESSAGE - - PAUSE_ONSET - - USER_MESSAGE - docs: >- - Type of Chat Event. There are eleven Chat Event types: - - - `SYSTEM_PROMPT`: The system prompt used to initialize the session. - - - `CHAT_START_MESSAGE`: Marks the beginning of the chat session. - - - `USER_RECORDING_START_MESSAGE`: Marks when the client began streaming - audio and the start of audio processing. - - - `USER_MESSAGE`: A message sent by the user. - - - `USER_INTERRUPTION`: A user-initiated interruption while the assistant - is speaking. - - - `AGENT_MESSAGE`: A response generated by the assistant. - - - `FUNCTION_CALL`: A record of a tool invocation by the assistant. - - - `FUNCTION_CALL_RESPONSE`: The result of a previously invoked function or - tool. - - - `PAUSE_ONSET`: Marks when the client sent a `pause_assistant_message` to - pause the assistant. - - - `RESUME_ONSET`: Marks when the client sent a `resume_assistant_message` - to resume the assistant. - - - `CHAT_END_MESSAGE`: Indicates the end of the chat session. - inline: true - source: - openapi: evi-openapi.json - ReturnChatEvent: - docs: A description of a single event in a chat returned from the server - properties: + docs: The timestamp when the first version of this prompt was created. id: type: string - docs: Identifier for a Chat Event. Formatted as a UUID. - chat_id: - type: string - docs: Identifier for the Chat this event occurred in. Formatted as a UUID. - timestamp: + docs: Identifier for a Prompt. Formatted as a UUID. + modified_on: type: long + docs: The timestamp when this version of the prompt was created. + name: + type: string + docs: Name applied to all versions of a particular Prompt. + text: + type: string + docs: Text used for this version of the Prompt. + version: + type: integer docs: >- - Time at which the Chat Event occurred. Measured in seconds since the - Unix epoch. - role: - type: ReturnChatEventRole - docs: >- - The role of the entity which generated the Chat Event. There are four - possible values: - - - `USER`: The user, capable of sending user messages and - interruptions. - - - `AGENT`: The assistant, capable of sending agent messages. - - - `SYSTEM`: The backend server, capable of transmitting errors. - - - `TOOL`: The function calling mechanism. - type: - type: ReturnChatEventType - docs: >- - Type of Chat Event. There are eleven Chat Event types: - - - `SYSTEM_PROMPT`: The system prompt used to initialize the session. - - - `CHAT_START_MESSAGE`: Marks the beginning of the chat session. - - - `USER_RECORDING_START_MESSAGE`: Marks when the client began - streaming audio and the start of audio processing. - - - `USER_MESSAGE`: A message sent by the user. - - - `USER_INTERRUPTION`: A user-initiated interruption while the - assistant is speaking. - - - `AGENT_MESSAGE`: A response generated by the assistant. - - - `FUNCTION_CALL`: A record of a tool invocation by the assistant. - - - `FUNCTION_CALL_RESPONSE`: The result of a previously invoked - function or tool. - - - `PAUSE_ONSET`: Marks when the client sent a - `pause_assistant_message` to pause the assistant. - - - `RESUME_ONSET`: Marks when the client sent a - `resume_assistant_message` to resume the assistant. - - - `CHAT_END_MESSAGE`: Indicates the end of the chat session. - message_text: - type: optional - docs: >- - The text of the Chat Event. This field contains the message content - for each event type listed in the `type` field. - emotion_features: + Version number for a Prompt. Version numbers should be integers. The + combination of configId and version number is unique. + version_description: type: optional + docs: Description that is appended to a specific version of a Prompt. + version_type: + type: string docs: >- - Stringified JSON containing the prosody model inference results. + Indicates whether this prompt is using a fixed version number or + auto-updating to the latest version. Values from the VersionType enum. + source: + openapi: evi-openapi.json + ReturnTimeoutSpec: + docs: A specific timeout configuration to be returned from the server + properties: + duration_secs: + type: optional + docs: >- + Duration in seconds for the timeout (e.g. 600 seconds represents 10 + minutes). + enabled: + type: boolean + docs: >- + Boolean indicating if this timeout is enabled. - EVI uses the prosody model to measure 48 expressions related to speech - and vocal characteristics. These results contain a detailed emotional - and tonal analysis of the audio. Scores typically range from 0 to 1, - with higher values indicating a stronger confidence level in the - measured attribute. - metadata: - type: optional - docs: Stringified JSON with additional metadata about the chat event. - related_event_id: - type: optional - docs: >- - Identifier for a related chat event. Currently only seen on - ASSISTANT_PROSODY events, to point back to the ASSISTANT_MESSAGE that - generated these prosody scores + If set to false, EVI will not timeout due to a specified duration + being reached. However, the conversation will eventually disconnect + after 1,800 seconds (30 minutes), which is the maximum WebSocket + duration limit for EVI. source: openapi: evi-openapi.json - ReturnConfigSpec: - docs: The Config associated with this Chat. + ReturnTimeoutSpecs: + docs: >- + Collection of timeout specifications returned by the server. + + + Timeouts are sent by the server when specific time-based events occur + during a chat session. These specifications set the inactivity timeout and + the maximum duration an EVI WebSocket connection can stay open before it + is automatically disconnected. properties: - id: - type: string - docs: Identifier for a Config. Formatted as a UUID. - version: - type: optional + inactivity: + type: ReturnTimeoutSpec docs: >- - Version number for a Config. + Specifies the duration of user inactivity (in seconds) after which the + EVI WebSocket connection will be automatically disconnected. Default + is 600 seconds (10 minutes). - Configs, Prompts, Custom Voices, and Tools are versioned. This - versioning system supports iterative development, allowing you to - progressively refine configurations and revert to previous versions if - needed. + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. + max_duration: + type: ReturnTimeoutSpec + docs: >- + Specifies the maximum allowed duration (in seconds) for an EVI + WebSocket connection before it is automatically disconnected. Default + is 1,800 seconds (30 minutes). - Version numbers are integer values representing different iterations - of the Config. Each update to the Config increments its version - number. + Accepts a minimum value of 30 seconds and a maximum value of 1,800 + seconds. source: openapi: evi-openapi.json - ReturnChatGroup: - docs: A description of chat_group and its status + ReturnUserDefinedToolToolType: + enum: + - BUILTIN + - FUNCTION + docs: >- + Type of Tool. Either `BUILTIN` for natively implemented tools, like web + search, or `FUNCTION` for user-defined tools. + inline: true + source: + openapi: evi-openapi.json + ReturnUserDefinedToolVersionType: + enum: + - FIXED + - LATEST + docs: >- + Versioning method for a Tool. Either `FIXED` for using a fixed version + number or `LATEST` for auto-updating to the latest version. + inline: true + source: + openapi: evi-openapi.json + ReturnUserDefinedTool: + docs: A specific tool version returned from the server properties: - id: - type: string - docs: >- - Identifier for the Chat Group. Any Chat resumed from this Chat Group - will have the same `chat_group_id`. Formatted as a UUID. - first_start_timestamp: + created_on: type: long docs: >- - Time at which the first Chat in this Chat Group was created. Measured - in seconds since the Unix epoch. - most_recent_start_timestamp: - type: long + Time at which the Tool was created. Measured in seconds since the Unix + epoch. + description: + type: optional docs: >- - Time at which the most recent Chat in this Chat Group was created. - Measured in seconds since the Unix epoch. - most_recent_chat_id: + An optional description of what the Tool does, used by the + supplemental LLM to choose when and how to call the function. + fallback_content: type: optional docs: >- - The `chat_id` of the most recent Chat in this Chat Group. Formatted as - a UUID. - most_recent_config: optional - num_chats: - type: integer - docs: The total number of Chats in this Chat Group. - active: - type: optional + Optional text passed to the supplemental LLM in place of the tool call + result. The LLM then uses this text to generate a response back to the + user, ensuring continuity in the conversation if the Tool errors. + id: + type: string + docs: Identifier for a Tool. Formatted as a UUID. + modified_on: + type: long docs: >- - Denotes whether there is an active Chat associated with this Chat - Group. - source: - openapi: evi-openapi.json - PostedEventMessageSpec: - docs: Settings for a specific event_message to be posted to the server - properties: - enabled: - type: boolean + Time at which the Tool was last modified. Measured in seconds since + the Unix epoch. + name: + type: string + docs: Name applied to all versions of a particular Tool. + parameters: + type: string docs: >- - Boolean indicating if this event message is enabled. + Stringified JSON defining the parameters used by this version of the + Tool. - If set to `true`, a message will be sent when the circumstances for - the specific event are met. - text: - type: optional + These parameters define the inputs needed for the Tool's execution, + including the expected data type and description for each input field. + Structured as a stringified JSON schema, this format ensures the tool + receives data in the expected format. + tool_type: + type: ReturnUserDefinedToolToolType docs: >- - Text to use as the event message when the corresponding event occurs. - If no text is specified, EVI will generate an appropriate message - based on its current context and the system prompt. - source: - openapi: evi-openapi.json - PostedTimeoutSpec: - docs: Settings for a specific timeout to be posted to the server - properties: - enabled: - type: boolean - docs: Boolean indicating if this event message is enabled. - duration_secs: - type: optional - docs: Duration in seconds for the timeout. - source: - openapi: evi-openapi.json - ReturnEventMessageSpec: - docs: A specific event message configuration to be returned from the server - properties: - enabled: - type: boolean + Type of Tool. Either `BUILTIN` for natively implemented tools, like + web search, or `FUNCTION` for user-defined tools. + version: + type: integer docs: >- - Boolean indicating if this event message is enabled. + Version number for a Tool. - If set to `true`, a message will be sent when the circumstances for - the specific event are met. - text: + Tools, Configs, Custom Voices, and Prompts are versioned. This + versioning system supports iterative development, allowing you to + progressively refine tools and revert to previous versions if needed. + + + Version numbers are integer values representing different iterations + of the Tool. Each update to the Tool increments its version number. + version_description: type: optional + docs: An optional description of the Tool version. + version_type: + type: ReturnUserDefinedToolVersionType docs: >- - Text to use as the event message when the corresponding event occurs. - If no text is specified, EVI will generate an appropriate message - based on its current context and the system prompt. + Versioning method for a Tool. Either `FIXED` for using a fixed version + number or `LATEST` for auto-updating to the latest version. source: openapi: evi-openapi.json - ReturnTimeoutSpec: - docs: A specific timeout configuration to be returned from the server + ReturnWebhookEventType: + enum: + - chat_started + - chat_ended + - tool_call + docs: Events this URL is subscribed to + inline: true + source: + openapi: evi-openapi.json + ReturnWebhookSpec: + docs: Collection of webhook URL endpoints to be returned from the server properties: - enabled: - type: boolean + events: docs: >- - Boolean indicating if this timeout is enabled. + The list of events the specified URL is subscribed to. - If set to false, EVI will not timeout due to a specified duration - being reached. However, the conversation will eventually disconnect - after 1,800 seconds (30 minutes), which is the maximum WebSocket - duration limit for EVI. - duration_secs: - type: optional + See our [webhooks + guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) + for more information on supported events. + type: list + url: + type: string docs: >- - Duration in seconds for the timeout (e.g. 600 seconds represents 10 - minutes). + The URL where event payloads will be sent. This must be a valid https + URL to ensure secure communication. The server at this URL must accept + POST requests with a JSON payload. source: openapi: evi-openapi.json VoiceId: @@ -3230,10 +3208,10 @@ types: ReturnVoice: docs: An Octave voice available for text-to-speech properties: + compatible_octave_models: optional> id: optional name: optional provider: optional - compatible_octave_models: optional> source: openapi: evi-openapi.json VoiceProvider: diff --git a/.mock/definition/empathic-voice/chatGroups.yml b/.mock/definition/empathic-voice/chatGroups.yml index 9233b0de..b60ec5bb 100644 --- a/.mock/definition/empathic-voice/chatGroups.yml +++ b/.mock/definition/empathic-voice/chatGroups.yml @@ -161,6 +161,84 @@ service: metadata: null config: null active: false + get-audio: + path: /v0/evi/chat_groups/{id}/audio + method: GET + docs: >- + Fetches a paginated list of audio for each **Chat** within the specified + **Chat Group**. For more details, see our guide on audio reconstruction + [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + source: + openapi: evi-openapi.json + path-parameters: + id: + type: string + docs: Identifier for a Chat Group. Formatted as a UUID. + display-name: Get chat group audio + request: + name: ChatGroupsGetAudioRequest + query-parameters: + page_number: + type: optional + default: 0 + docs: >- + Specifies the page number to retrieve, enabling pagination. + + + This parameter uses zero-based indexing. For example, setting + `page_number` to 0 retrieves the first page of results (items 0-9 + if `page_size` is 10), setting `page_number` to 1 retrieves the + second page (items 10-19), and so on. Defaults to 0, which + retrieves the first page. + page_size: + type: optional + docs: >- + Specifies the maximum number of results to include per page, + enabling pagination. The value must be between 1 and 100, + inclusive. + + + For example, if `page_size` is set to 10, each page will include + up to 10 items. Defaults to 10. + ascending_order: + type: optional + docs: >- + Specifies the sorting order of the results based on their creation + date. Set to true for ascending order (chronological, with the + oldest records first) and false for descending order + (reverse-chronological, with the newest records first). Defaults + to true. + response: + docs: Success + type: root.ReturnChatGroupPagedAudioReconstructions + status-code: 200 + errors: + - root.BadRequestError + examples: + - path-parameters: + id: 369846cf-6ad5-404d-905e-a8acb5cdfc78 + query-parameters: + page_number: 0 + page_size: 10 + ascending_order: true + response: + body: + id: 369846cf-6ad5-404d-905e-a8acb5cdfc78 + user_id: e6235940-cfda-3988-9147-ff531627cf42 + num_chats: 1 + page_number: 0 + page_size: 10 + total_pages: 1 + pagination_direction: ASC + audio_reconstructions_page: + - id: 470a49f6-1dec-4afe-8b61-035d3b2d63b0 + user_id: e6235940-cfda-3988-9147-ff531627cf42 + status: COMPLETE + filename: >- + e6235940-cfda-3988-9147-ff531627cf42/470a49f6-1dec-4afe-8b61-035d3b2d63b0/reconstructed_audio.mp4 + modified_at: 1729875432555 + signed_audio_url: https://storage.googleapis.com/...etc. + signed_url_expiration_timestamp_millis: 1730232816964 list-chat-group-events: path: /v0/evi/chat_groups/{id}/events method: GET @@ -541,83 +619,5 @@ service: 0.022247314453125, "Tiredness": 0.0194549560546875, "Triumph": 0.04107666015625} metadata: '' - get-audio: - path: /v0/evi/chat_groups/{id}/audio - method: GET - docs: >- - Fetches a paginated list of audio for each **Chat** within the specified - **Chat Group**. For more details, see our guide on audio reconstruction - [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). - source: - openapi: evi-openapi.json - path-parameters: - id: - type: string - docs: Identifier for a Chat Group. Formatted as a UUID. - display-name: Get chat group audio - request: - name: ChatGroupsGetAudioRequest - query-parameters: - page_number: - type: optional - default: 0 - docs: >- - Specifies the page number to retrieve, enabling pagination. - - - This parameter uses zero-based indexing. For example, setting - `page_number` to 0 retrieves the first page of results (items 0-9 - if `page_size` is 10), setting `page_number` to 1 retrieves the - second page (items 10-19), and so on. Defaults to 0, which - retrieves the first page. - page_size: - type: optional - docs: >- - Specifies the maximum number of results to include per page, - enabling pagination. The value must be between 1 and 100, - inclusive. - - - For example, if `page_size` is set to 10, each page will include - up to 10 items. Defaults to 10. - ascending_order: - type: optional - docs: >- - Specifies the sorting order of the results based on their creation - date. Set to true for ascending order (chronological, with the - oldest records first) and false for descending order - (reverse-chronological, with the newest records first). Defaults - to true. - response: - docs: Success - type: root.ReturnChatGroupPagedAudioReconstructions - status-code: 200 - errors: - - root.BadRequestError - examples: - - path-parameters: - id: 369846cf-6ad5-404d-905e-a8acb5cdfc78 - query-parameters: - page_number: 0 - page_size: 10 - ascending_order: true - response: - body: - id: 369846cf-6ad5-404d-905e-a8acb5cdfc78 - user_id: e6235940-cfda-3988-9147-ff531627cf42 - num_chats: 1 - page_number: 0 - page_size: 10 - total_pages: 1 - pagination_direction: ASC - audio_reconstructions_page: - - id: 470a49f6-1dec-4afe-8b61-035d3b2d63b0 - user_id: e6235940-cfda-3988-9147-ff531627cf42 - status: COMPLETE - filename: >- - e6235940-cfda-3988-9147-ff531627cf42/470a49f6-1dec-4afe-8b61-035d3b2d63b0/reconstructed_audio.mp4 - modified_at: 1729875432555 - signed_audio_url: https://storage.googleapis.com/...etc. - signed_url_expiration_timestamp_millis: 1730232816964 source: openapi: evi-openapi.json diff --git a/.mock/definition/empathic-voice/configs.yml b/.mock/definition/empathic-voice/configs.yml index a74be639..06995d3c 100644 --- a/.mock/definition/empathic-voice/configs.yml +++ b/.mock/definition/empathic-voice/configs.yml @@ -136,21 +136,25 @@ service: name: PostedConfig body: properties: + builtin_tools: + type: optional>> + docs: List of built-in tools associated with this Config. + ellm_model: + type: optional + docs: >- + The eLLM setup associated with this Config. + + + Hume's eLLM (empathic Large Language Model) is a multimodal + language model that takes into account both expression measures + and language. The eLLM generates short, empathic language + responses and guides text-to-speech (TTS) prosody. + event_messages: optional evi_version: type: string docs: >- EVI version to use. Only versions `3` and `4-mini` are supported. - name: - type: string - docs: Name applied to all versions of a particular Config. - version_description: - type: optional - docs: An optional description of the Config version. - prompt: optional - voice: - type: optional - docs: A voice specification associated with this Config. language_model: type: optional docs: >- @@ -161,23 +165,9 @@ service: from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model: - type: optional - docs: >- - The eLLM setup associated with this Config. - - - Hume's eLLM (empathic Large Language Model) is a multimodal - language model that takes into account both expression measures - and language. The eLLM generates short, empathic language - responses and guides text-to-speech (TTS) prosody. - tools: - type: optional>> - docs: List of user-defined tools associated with this Config. - builtin_tools: - type: optional>> - docs: List of built-in tools associated with this Config. - event_messages: optional + name: + type: string + docs: Name applied to all versions of a particular Config. nudges: type: optional docs: >- @@ -185,7 +175,17 @@ service: conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. + prompt: optional timeouts: optional + tools: + type: optional>> + docs: List of user-defined tools associated with this Config. + version_description: + type: optional + docs: An optional description of the Config version. + voice: + type: optional + docs: A voice specification associated with this Config. webhooks: type: optional>> docs: Webhook config specifications for each subscriber. @@ -409,16 +409,23 @@ service: name: PostedConfigVersion body: properties: + builtin_tools: + type: optional>> + docs: List of built-in tools associated with this Config version. + ellm_model: + type: optional + docs: >- + The eLLM setup associated with this Config version. + + + Hume's eLLM (empathic Large Language Model) is a multimodal + language model that takes into account both expression measures + and language. The eLLM generates short, empathic language + responses and guides text-to-speech (TTS) prosody. + event_messages: optional evi_version: type: string docs: The version of the EVI used with this config. - version_description: - type: optional - docs: An optional description of the Config version. - prompt: optional - voice: - type: optional - docs: A voice specification associated with this Config version. language_model: type: optional docs: >- @@ -430,25 +437,18 @@ service: from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model: - type: optional - docs: >- - The eLLM setup associated with this Config version. - - - Hume's eLLM (empathic Large Language Model) is a multimodal - language model that takes into account both expression measures - and language. The eLLM generates short, empathic language - responses and guides text-to-speech (TTS) prosody. + nudges: optional + prompt: optional + timeouts: optional tools: type: optional>> docs: List of user-defined tools associated with this Config version. - builtin_tools: - type: optional>> - docs: List of built-in tools associated with this Config version. - event_messages: optional - timeouts: optional - nudges: optional + version_description: + type: optional + docs: An optional description of the Config version. + voice: + type: optional + docs: A voice specification associated with this Config version. webhooks: type: optional>> docs: Webhook config specifications for each subscriber. diff --git a/.mock/definition/empathic-voice/prompts.yml b/.mock/definition/empathic-voice/prompts.yml index e6d805b7..10898960 100644 --- a/.mock/definition/empathic-voice/prompts.yml +++ b/.mock/definition/empathic-voice/prompts.yml @@ -118,9 +118,6 @@ service: name: type: string docs: Name applied to all versions of a particular Prompt. - version_description: - type: optional - docs: An optional description of the Prompt version. text: type: string docs: >- @@ -137,6 +134,9 @@ service: For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + version_description: + type: optional + docs: An optional description of the Prompt version. content-type: application/json response: docs: Created @@ -268,9 +268,6 @@ service: name: PostedPromptVersion body: properties: - version_description: - type: optional - docs: An optional description of the Prompt version. text: type: string docs: >- @@ -288,6 +285,9 @@ service: For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + version_description: + type: optional + docs: An optional description of the Prompt version. content-type: application/json response: docs: Created diff --git a/.mock/definition/empathic-voice/tools.yml b/.mock/definition/empathic-voice/tools.yml index b5dd6787..646e997e 100644 --- a/.mock/definition/empathic-voice/tools.yml +++ b/.mock/definition/empathic-voice/tools.yml @@ -125,17 +125,21 @@ service: name: PostedUserDefinedTool body: properties: - name: - type: string - docs: Name applied to all versions of a particular Tool. - version_description: - type: optional - docs: An optional description of the Tool version. description: type: optional docs: >- An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. + fallback_content: + type: optional + docs: >- + Optional text passed to the supplemental LLM in place of the + tool call result. The LLM then uses this text to generate a + response back to the user, ensuring continuity in the + conversation if the Tool errors. + name: + type: string + docs: Name applied to all versions of a particular Tool. parameters: type: string docs: >- @@ -147,13 +151,9 @@ service: execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - fallback_content: + version_description: type: optional - docs: >- - Optional text passed to the supplemental LLM in place of the - tool call result. The LLM then uses this text to generate a - response back to the user, ensuring continuity in the - conversation if the Tool errors. + docs: An optional description of the Tool version. content-type: application/json response: docs: Created @@ -305,14 +305,18 @@ service: name: PostedUserDefinedToolVersion body: properties: - version_description: - type: optional - docs: An optional description of the Tool version. description: type: optional docs: >- An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. + fallback_content: + type: optional + docs: >- + Optional text passed to the supplemental LLM in place of the + tool call result. The LLM then uses this text to generate a + response back to the user, ensuring continuity in the + conversation if the Tool errors. parameters: type: string docs: >- @@ -324,13 +328,9 @@ service: execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - fallback_content: + version_description: type: optional - docs: >- - Optional text passed to the supplemental LLM in place of the - tool call result. The LLM then uses this text to generate a - response back to the user, ensuring continuity in the - conversation if the Tool errors. + docs: An optional description of the Tool version. content-type: application/json response: docs: Created diff --git a/.mock/definition/tts/__package__.yml b/.mock/definition/tts/__package__.yml index 51d358af..53427e35 100644 --- a/.mock/definition/tts/__package__.yml +++ b/.mock/definition/tts/__package__.yml @@ -188,7 +188,7 @@ service: method: POST source: openapi: tts-openapi.json - display-name: Voice Conversion Stream File + display-name: Voice Conversion (Streamed File) request: name: ConvertVoiceFileRequest body: @@ -226,7 +226,7 @@ service: method: POST source: openapi: tts-openapi.json - display-name: Voice Conversion Stream Json + display-name: Voice Conversion (Streamed JSON) request: name: ConvertVoiceJsonRequest body: @@ -446,9 +446,12 @@ types: openapi: tts-openapi.json Timestamp: properties: - text: string + text: + type: string + docs: The word or phoneme text that the timestamp corresponds to. time: type: MillisecondInterval + docs: The start and end timestamps for the word or phoneme in milliseconds. type: type: TimestampType source: @@ -577,7 +580,9 @@ types: type: string docs: The text for this **Snippet**. timestamps: - docs: A list of word or phoneme level timestamps for the generated audio. + docs: >- + A list of word or phoneme level timestamps for the generated audio. + Timestamps are only returned for Octave 2 requests. type: list transcribed_text: type: optional @@ -620,6 +625,13 @@ types: is `48000 Hz`. source: openapi: tts-openapi.json + ErrorResponse: + properties: + code: optional + error: optional + message: optional + source: + openapi: tts-openapi.json ReturnGeneration: properties: audio: @@ -674,7 +686,9 @@ types: docs: Specifies the output audio file format. include_timestamp_types: type: optional> - docs: The set of timestamp types to include in the response. + docs: >- + The set of timestamp types to include in the response. Only supported + for Octave 2 requests. num_generations: type: optional docs: >- @@ -786,6 +800,7 @@ types: ReturnVoice: docs: An Octave voice available for text-to-speech properties: + compatible_octave_models: optional> id: type: optional docs: ID of the voice in the `Voice Library`. @@ -800,7 +815,6 @@ types: Voices created through this endpoint will always have the provider set to `CUSTOM_VOICE`, indicating a custom voice stored in your account. - compatible_octave_models: optional> source: openapi: tts-openapi.json FormatPcm: @@ -883,13 +897,6 @@ types: type: literal<"wav"> source: openapi: tts-openapi.json - ErrorResponse: - properties: - error: optional - message: optional - code: optional - source: - openapi: tts-openapi.json ReturnPagedVoices: docs: A paginated list Octave voices available for text-to-speech properties: diff --git a/poetry.lock b/poetry.lock index 1a58652a..ef9f0876 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "aiofiles" @@ -148,18 +148,18 @@ wrapt = [ [[package]] name = "asttokens" -version = "3.0.0" +version = "3.0.1" description = "Annotate AST trees with source code positions" optional = true python-versions = ">=3.8" files = [ - {file = "asttokens-3.0.0-py3-none-any.whl", hash = "sha256:e3078351a059199dd5138cb1c706e6430c05eff2ff136af5eb4790f9d28932e2"}, - {file = "asttokens-3.0.0.tar.gz", hash = "sha256:0dcd8baa8d62b0c1d118b399b2ddba3c4aff271d0d7a9e0d4c1681c79035bbc7"}, + {file = "asttokens-3.0.1-py3-none-any.whl", hash = "sha256:15a3ebc0f43c2d0a50eeafea25e19046c68398e487b9f1f5b517f7c0f40f976a"}, + {file = "asttokens-3.0.1.tar.gz", hash = "sha256:71a4ee5de0bde6a31d64f6b13f2293ac190344478f081c3d1bccfcf5eacb0cb7"}, ] [package.extras] -astroid = ["astroid (>=2,<4)"] -test = ["astroid (>=2,<4)", "pytest", "pytest-cov", "pytest-xdist"] +astroid = ["astroid (>=2,<5)"] +test = ["astroid (>=2,<5)", "pytest (<9.0)", "pytest-cov", "pytest-xdist"] [[package]] name = "async-lru" @@ -242,13 +242,13 @@ css = ["tinycss2 (>=1.1.0,<1.5)"] [[package]] name = "certifi" -version = "2025.10.5" +version = "2025.11.12" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.7" files = [ - {file = "certifi-2025.10.5-py3-none-any.whl", hash = "sha256:0f212c2744a9bb6de0c56639a6f68afe01ecd92d91f14ae897c4fe7bbeeef0de"}, - {file = "certifi-2025.10.5.tar.gz", hash = "sha256:47c09d31ccf2acf0be3f701ea53595ee7e0b8fa08801c6624be771df09ae7b43"}, + {file = "certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b"}, + {file = "certifi-2025.11.12.tar.gz", hash = "sha256:d8ab5478f2ecd78af242878415affce761ca6bc54a22a27e026d7c25357c3316"}, ] [[package]] @@ -1288,13 +1288,13 @@ test = ["jupyter-server (>=2.0.0)", "pytest (>=7.0)", "pytest-jupyter[server] (> [[package]] name = "jupyterlab" -version = "4.4.10" +version = "4.5.0" description = "JupyterLab computational environment" optional = true python-versions = ">=3.9" files = [ - {file = "jupyterlab-4.4.10-py3-none-any.whl", hash = "sha256:65939ab4c8dcd0c42185c2d0d1a9d60b254dc8c46fc4fdb286b63c51e9358e07"}, - {file = "jupyterlab-4.4.10.tar.gz", hash = "sha256:521c017508af4e1d6d9d8a9d90f47a11c61197ad63b2178342489de42540a615"}, + {file = "jupyterlab-4.5.0-py3-none-any.whl", hash = "sha256:88e157c75c1afff64c7dc4b801ec471450b922a4eae4305211ddd40da8201c8a"}, + {file = "jupyterlab-4.5.0.tar.gz", hash = "sha256:aec33d6d8f1225b495ee2cf20f0514f45e6df8e360bdd7ac9bace0b7ac5177ea"}, ] [package.dependencies] @@ -1306,7 +1306,7 @@ jinja2 = ">=3.0.3" jupyter-core = "*" jupyter-lsp = ">=2.0.0" jupyter-server = ">=2.4.0,<3" -jupyterlab-server = ">=2.27.1,<3" +jupyterlab-server = ">=2.28.0,<3" notebook-shim = ">=0.2" packaging = "*" setuptools = ">=41.1.0" @@ -1315,9 +1315,9 @@ tornado = ">=6.2.0" traitlets = "*" [package.extras] -dev = ["build", "bump2version", "coverage", "hatch", "pre-commit", "pytest-cov", "ruff (==0.11.4)"] +dev = ["build", "bump2version", "coverage", "hatch", "pre-commit", "pytest-cov", "ruff (==0.11.12)"] docs = ["jsx-lexer", "myst-parser", "pydata-sphinx-theme (>=0.13.0)", "pytest", "pytest-check-links", "pytest-jupyter", "sphinx (>=1.8,<8.2.0)", "sphinx-copybutton"] -docs-screenshots = ["altair (==5.5.0)", "ipython (==8.16.1)", "ipywidgets (==8.1.5)", "jupyterlab-geojson (==3.4.0)", "jupyterlab-language-pack-zh-cn (==4.3.post1)", "matplotlib (==3.10.0)", "nbconvert (>=7.0.0)", "pandas (==2.2.3)", "scipy (==1.15.1)", "vega-datasets (==0.9.0)"] +docs-screenshots = ["altair (==6.0.0)", "ipython (==8.16.1)", "ipywidgets (==8.1.5)", "jupyterlab-geojson (==3.4.0)", "jupyterlab-language-pack-zh-cn (==4.3.post1)", "matplotlib (==3.10.0)", "nbconvert (>=7.0.0)", "pandas (==2.2.3)", "scipy (==1.15.1)"] test = ["coverage", "pytest (>=7.0)", "pytest-check-links (>=0.7)", "pytest-console-scripts", "pytest-cov", "pytest-jupyter (>=0.5.3)", "pytest-timeout", "pytest-tornasync", "requests", "requests-cache", "virtualenv"] upgrade-extension = ["copier (>=9,<10)", "jinja2-time (<0.3)", "pydantic (<3.0)", "pyyaml-include (<3.0)", "tomli-w (<2.0)"] @@ -1736,26 +1736,26 @@ files = [ [[package]] name = "notebook" -version = "7.4.7" +version = "7.5.0" description = "Jupyter Notebook - A web-based notebook environment for interactive computing" optional = true -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "notebook-7.4.7-py3-none-any.whl", hash = "sha256:362b7c95527f7dd3c4c84d410b782872fd9c734fb2524c11dd92758527b6eda6"}, - {file = "notebook-7.4.7.tar.gz", hash = "sha256:3f0a04027dfcee8a876de48fba13ab77ec8c12f72f848a222ed7f5081b9e342a"}, + {file = "notebook-7.5.0-py3-none-any.whl", hash = "sha256:3300262d52905ca271bd50b22617681d95f08a8360d099e097726e6d2efb5811"}, + {file = "notebook-7.5.0.tar.gz", hash = "sha256:3b27eaf9913033c28dde92d02139414c608992e1df4b969c843219acf2ff95e4"}, ] [package.dependencies] jupyter-server = ">=2.4.0,<3" -jupyterlab = ">=4.4.9,<4.5" -jupyterlab-server = ">=2.27.1,<3" +jupyterlab = ">=4.5.0rc0,<4.6" +jupyterlab-server = ">=2.28.0,<3" notebook-shim = ">=0.2,<0.3" tornado = ">=6.2.0" [package.extras] dev = ["hatch", "pre-commit"] docs = ["myst-parser", "nbsphinx", "pydata-sphinx-theme", "sphinx (>=1.3.6)", "sphinxcontrib-github-alt", "sphinxcontrib-spelling"] -test = ["importlib-resources (>=5.0)", "ipykernel", "jupyter-server[test] (>=2.4.0,<3)", "jupyterlab-server[test] (>=2.27.1,<3)", "nbval", "pytest (>=7.0)", "pytest-console-scripts", "pytest-timeout", "pytest-tornasync", "requests"] +test = ["importlib-resources (>=5.0)", "ipykernel", "jupyter-server[test] (>=2.4.0,<3)", "jupyterlab-server[test] (>=2.28.0,<3)", "nbval", "pytest (>=7.0)", "pytest-console-scripts", "pytest-timeout", "pytest-tornasync", "requests"] [[package]] name = "notebook-shim" @@ -3093,13 +3093,13 @@ files = [ [[package]] name = "types-python-dateutil" -version = "2.9.0.20251008" +version = "2.9.0.20251115" description = "Typing stubs for python-dateutil" optional = false python-versions = ">=3.9" files = [ - {file = "types_python_dateutil-2.9.0.20251008-py3-none-any.whl", hash = "sha256:b9a5232c8921cf7661b29c163ccc56055c418ab2c6eabe8f917cbcc73a4c4157"}, - {file = "types_python_dateutil-2.9.0.20251008.tar.gz", hash = "sha256:c3826289c170c93ebd8360c3485311187df740166dbab9dd3b792e69f2bc1f9c"}, + {file = "types_python_dateutil-2.9.0.20251115-py3-none-any.whl", hash = "sha256:9cf9c1c582019753b8639a081deefd7e044b9fa36bd8217f565c6c4e36ee0624"}, + {file = "types_python_dateutil-2.9.0.20251115.tar.gz", hash = "sha256:8a47f2c3920f52a994056b8786309b43143faa5a64d4cbb2722d6addabdf1a58"}, ] [[package]] @@ -3220,97 +3220,80 @@ test = ["pytest", "websockets"] [[package]] name = "websockets" -version = "13.1" +version = "15.0.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "websockets-13.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f48c749857f8fb598fb890a75f540e3221d0976ed0bf879cf3c7eef34151acee"}, - {file = "websockets-13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7e72ce6bda6fb9409cc1e8164dd41d7c91466fb599eb047cfda72fe758a34a7"}, - {file = "websockets-13.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f779498eeec470295a2b1a5d97aa1bc9814ecd25e1eb637bd9d1c73a327387f6"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4676df3fe46956fbb0437d8800cd5f2b6d41143b6e7e842e60554398432cf29b"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7affedeb43a70351bb811dadf49493c9cfd1ed94c9c70095fd177e9cc1541fa"}, - {file = "websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1971e62d2caa443e57588e1d82d15f663b29ff9dfe7446d9964a4b6f12c1e700"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5f2e75431f8dc4a47f31565a6e1355fb4f2ecaa99d6b89737527ea917066e26c"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58cf7e75dbf7e566088b07e36ea2e3e2bd5676e22216e4cad108d4df4a7402a0"}, - {file = "websockets-13.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c90d6dec6be2c7d03378a574de87af9b1efea77d0c52a8301dd831ece938452f"}, - {file = "websockets-13.1-cp310-cp310-win32.whl", hash = "sha256:730f42125ccb14602f455155084f978bd9e8e57e89b569b4d7f0f0c17a448ffe"}, - {file = "websockets-13.1-cp310-cp310-win_amd64.whl", hash = "sha256:5993260f483d05a9737073be197371940c01b257cc45ae3f1d5d7adb371b266a"}, - {file = "websockets-13.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:61fc0dfcda609cda0fc9fe7977694c0c59cf9d749fbb17f4e9483929e3c48a19"}, - {file = "websockets-13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ceec59f59d092c5007e815def4ebb80c2de330e9588e101cf8bd94c143ec78a5"}, - {file = "websockets-13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1dca61c6db1166c48b95198c0b7d9c990b30c756fc2923cc66f68d17dc558fd"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308e20f22c2c77f3f39caca508e765f8725020b84aa963474e18c59accbf4c02"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d516c325e6540e8a57b94abefc3459d7dab8ce52ac75c96cad5549e187e3a7"}, - {file = "websockets-13.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c6e35319b46b99e168eb98472d6c7d8634ee37750d7693656dc766395df096"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5f9fee94ebafbc3117c30be1844ed01a3b177bb6e39088bc6b2fa1dc15572084"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7c1e90228c2f5cdde263253fa5db63e6653f1c00e7ec64108065a0b9713fa1b3"}, - {file = "websockets-13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6548f29b0e401eea2b967b2fdc1c7c7b5ebb3eeb470ed23a54cd45ef078a0db9"}, - {file = "websockets-13.1-cp311-cp311-win32.whl", hash = "sha256:c11d4d16e133f6df8916cc5b7e3e96ee4c44c936717d684a94f48f82edb7c92f"}, - {file = "websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557"}, - {file = "websockets-13.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9d75baf00138f80b48f1eac72ad1535aac0b6461265a0bcad391fc5aba875cfc"}, - {file = "websockets-13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9b6f347deb3dcfbfde1c20baa21c2ac0751afaa73e64e5b693bb2b848efeaa49"}, - {file = "websockets-13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de58647e3f9c42f13f90ac7e5f58900c80a39019848c5547bc691693098ae1bd"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1b54689e38d1279a51d11e3467dd2f3a50f5f2e879012ce8f2d6943f00e83f0"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf1781ef73c073e6b0f90af841aaf98501f975d306bbf6221683dd594ccc52b6"}, - {file = "websockets-13.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d23b88b9388ed85c6faf0e74d8dec4f4d3baf3ecf20a65a47b836d56260d4b9"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3c78383585f47ccb0fcf186dcb8a43f5438bd7d8f47d69e0b56f71bf431a0a68"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d6d300f8ec35c24025ceb9b9019ae9040c1ab2f01cddc2bcc0b518af31c75c14"}, - {file = "websockets-13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a9dcaf8b0cc72a392760bb8755922c03e17a5a54e08cca58e8b74f6902b433cf"}, - {file = "websockets-13.1-cp312-cp312-win32.whl", hash = "sha256:2f85cf4f2a1ba8f602298a853cec8526c2ca42a9a4b947ec236eaedb8f2dc80c"}, - {file = "websockets-13.1-cp312-cp312-win_amd64.whl", hash = "sha256:38377f8b0cdeee97c552d20cf1865695fcd56aba155ad1b4ca8779a5b6ef4ac3"}, - {file = "websockets-13.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a9ab1e71d3d2e54a0aa646ab6d4eebfaa5f416fe78dfe4da2839525dc5d765c6"}, - {file = "websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b9d7439d7fab4dce00570bb906875734df13d9faa4b48e261c440a5fec6d9708"}, - {file = "websockets-13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:327b74e915cf13c5931334c61e1a41040e365d380f812513a255aa804b183418"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:325b1ccdbf5e5725fdcb1b0e9ad4d2545056479d0eee392c291c1bf76206435a"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:346bee67a65f189e0e33f520f253d5147ab76ae42493804319b5716e46dddf0f"}, - {file = "websockets-13.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91a0fa841646320ec0d3accdff5b757b06e2e5c86ba32af2e0815c96c7a603c5"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:18503d2c5f3943e93819238bf20df71982d193f73dcecd26c94514f417f6b135"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9cd1af7e18e5221d2878378fbc287a14cd527fdd5939ed56a18df8a31136bb2"}, - {file = "websockets-13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:70c5be9f416aa72aab7a2a76c90ae0a4fe2755c1816c153c1a2bcc3333ce4ce6"}, - {file = "websockets-13.1-cp313-cp313-win32.whl", hash = "sha256:624459daabeb310d3815b276c1adef475b3e6804abaf2d9d2c061c319f7f187d"}, - {file = "websockets-13.1-cp313-cp313-win_amd64.whl", hash = "sha256:c518e84bb59c2baae725accd355c8dc517b4a3ed8db88b4bc93c78dae2974bf2"}, - {file = "websockets-13.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c7934fd0e920e70468e676fe7f1b7261c1efa0d6c037c6722278ca0228ad9d0d"}, - {file = "websockets-13.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:149e622dc48c10ccc3d2760e5f36753db9cacf3ad7bc7bbbfd7d9c819e286f23"}, - {file = "websockets-13.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a569eb1b05d72f9bce2ebd28a1ce2054311b66677fcd46cf36204ad23acead8c"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95df24ca1e1bd93bbca51d94dd049a984609687cb2fb08a7f2c56ac84e9816ea"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8dbb1bf0c0a4ae8b40bdc9be7f644e2f3fb4e8a9aca7145bfa510d4a374eeb7"}, - {file = "websockets-13.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:035233b7531fb92a76beefcbf479504db8c72eb3bff41da55aecce3a0f729e54"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e4450fc83a3df53dec45922b576e91e94f5578d06436871dce3a6be38e40f5db"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:463e1c6ec853202dd3657f156123d6b4dad0c546ea2e2e38be2b3f7c5b8e7295"}, - {file = "websockets-13.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6d6855bbe70119872c05107e38fbc7f96b1d8cb047d95c2c50869a46c65a8e96"}, - {file = "websockets-13.1-cp38-cp38-win32.whl", hash = "sha256:204e5107f43095012b00f1451374693267adbb832d29966a01ecc4ce1db26faf"}, - {file = "websockets-13.1-cp38-cp38-win_amd64.whl", hash = "sha256:485307243237328c022bc908b90e4457d0daa8b5cf4b3723fd3c4a8012fce4c6"}, - {file = "websockets-13.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9b37c184f8b976f0c0a231a5f3d6efe10807d41ccbe4488df8c74174805eea7d"}, - {file = "websockets-13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:163e7277e1a0bd9fb3c8842a71661ad19c6aa7bb3d6678dc7f89b17fbcc4aeb7"}, - {file = "websockets-13.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4b889dbd1342820cc210ba44307cf75ae5f2f96226c0038094455a96e64fb07a"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:586a356928692c1fed0eca68b4d1c2cbbd1ca2acf2ac7e7ebd3b9052582deefa"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7bd6abf1e070a6b72bfeb71049d6ad286852e285f146682bf30d0296f5fbadfa"}, - {file = "websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2aad13a200e5934f5a6767492fb07151e1de1d6079c003ab31e1823733ae79"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:df01aea34b6e9e33572c35cd16bae5a47785e7d5c8cb2b54b2acdb9678315a17"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e54affdeb21026329fb0744ad187cf812f7d3c2aa702a5edb562b325191fcab6"}, - {file = "websockets-13.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9ef8aa8bdbac47f4968a5d66462a2a0935d044bf35c0e5a8af152d58516dbeb5"}, - {file = "websockets-13.1-cp39-cp39-win32.whl", hash = "sha256:deeb929efe52bed518f6eb2ddc00cc496366a14c726005726ad62c2dd9017a3c"}, - {file = "websockets-13.1-cp39-cp39-win_amd64.whl", hash = "sha256:7c65ffa900e7cc958cd088b9a9157a8141c991f8c53d11087e6fb7277a03f81d"}, - {file = "websockets-13.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5dd6da9bec02735931fccec99d97c29f47cc61f644264eb995ad6c0c27667238"}, - {file = "websockets-13.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:2510c09d8e8df777177ee3d40cd35450dc169a81e747455cc4197e63f7e7bfe5"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1c3cf67185543730888b20682fb186fc8d0fa6f07ccc3ef4390831ab4b388d9"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcc03c8b72267e97b49149e4863d57c2d77f13fae12066622dc78fe322490fe6"}, - {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:004280a140f220c812e65f36944a9ca92d766b6cc4560be652a0a3883a79ed8a"}, - {file = "websockets-13.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e2620453c075abeb0daa949a292e19f56de518988e079c36478bacf9546ced23"}, - {file = "websockets-13.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9156c45750b37337f7b0b00e6248991a047be4aa44554c9886fe6bdd605aab3b"}, - {file = "websockets-13.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:80c421e07973a89fbdd93e6f2003c17d20b69010458d3a8e37fb47874bd67d51"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82d0ba76371769d6a4e56f7e83bb8e81846d17a6190971e38b5de108bde9b0d7"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e9875a0143f07d74dc5e1ded1c4581f0d9f7ab86c78994e2ed9e95050073c94d"}, - {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a11e38ad8922c7961447f35c7b17bffa15de4d17c70abd07bfbe12d6faa3e027"}, - {file = "websockets-13.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4059f790b6ae8768471cddb65d3c4fe4792b0ab48e154c9f0a04cefaabcd5978"}, - {file = "websockets-13.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:25c35bf84bf7c7369d247f0b8cfa157f989862c49104c5cf85cb5436a641d93e"}, - {file = "websockets-13.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:83f91d8a9bb404b8c2c41a707ac7f7f75b9442a0a876df295de27251a856ad09"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a43cfdcddd07f4ca2b1afb459824dd3c6d53a51410636a2c7fc97b9a8cf4842"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48a2ef1381632a2f0cb4efeff34efa97901c9fbc118e01951ad7cfc10601a9bb"}, - {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459bf774c754c35dbb487360b12c5727adab887f1622b8aed5755880a21c4a20"}, - {file = "websockets-13.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:95858ca14a9f6fa8413d29e0a585b31b278388aa775b8a81fa24830123874678"}, - {file = "websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f"}, - {file = "websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205"}, + {file = "websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf"}, + {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9"}, + {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c"}, + {file = "websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256"}, + {file = "websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57"}, + {file = "websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792"}, + {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3"}, + {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf"}, + {file = "websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85"}, + {file = "websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665"}, + {file = "websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5"}, + {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4"}, + {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597"}, + {file = "websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9"}, + {file = "websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675"}, + {file = "websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f"}, + {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d"}, + {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4"}, + {file = "websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa"}, + {file = "websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f4c04ead5aed67c8a1a20491d54cdfba5884507a48dd798ecaf13c74c4489f5"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abdc0c6c8c648b4805c5eacd131910d2a7f6455dfd3becab248ef108e89ab16a"}, + {file = "websockets-15.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a625e06551975f4b7ea7102bc43895b90742746797e2e14b70ed61c43a90f09b"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d591f8de75824cbb7acad4e05d2d710484f15f29d4a915092675ad3456f11770"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47819cea040f31d670cc8d324bb6435c6f133b8c7a19ec3d61634e62f8d8f9eb"}, + {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac017dd64572e5c3bd01939121e4d16cf30e5d7e110a119399cf3133b63ad054"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4a9fac8e469d04ce6c25bb2610dc535235bd4aa14996b4e6dbebf5e007eba5ee"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363c6f671b761efcb30608d24925a382497c12c506b51661883c3e22337265ed"}, + {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2034693ad3097d5355bfdacfffcbd3ef5694f9718ab7f29c29689a9eae841880"}, + {file = "websockets-15.0.1-cp39-cp39-win32.whl", hash = "sha256:3b1ac0d3e594bf121308112697cf4b32be538fb1444468fb0a6ae4feebc83411"}, + {file = "websockets-15.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7643a03db5c95c799b89b31c036d5f27eeb4d259c798e878d6937d71832b1e4"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04"}, + {file = "websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7f493881579c90fc262d9cdbaa05a6b54b3811c2f300766748db79f098db9940"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:47b099e1f4fbc95b701b6e85768e1fcdaf1630f3cbe4765fa216596f12310e2e"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f2b6de947f8c757db2db9c71527933ad0019737ec374a8a6be9a956786aaf9"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08eb4c2b7d6c41da6ca0600c077e93f5adcfd979cd777d747e9ee624556da4b"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b826973a4a2ae47ba357e4e82fa44a463b8f168e1ca775ac64521442b19e87f"}, + {file = "websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123"}, + {file = "websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f"}, + {file = "websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"}, ] [[package]] @@ -3440,4 +3423,4 @@ microphone = ["sounddevice"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "ac3ed54f9220a726793d76d482bfd8200f55fa4620eebc890038d5687305c72b" +content-hash = "0d8c6b62783e6e3a1447345a49dc0a1175830c1bdf378d69c16628085eed419f" diff --git a/pyproject.toml b/pyproject.toml index f4d622cb..9507520a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "hume" [tool.poetry] name = "hume" -version = "0.13.4" +version = "0.13.5" description = "A Python SDK for Hume AI" readme = "README.md" authors = [] @@ -68,7 +68,7 @@ pydantic = ">= 1.9.2" pydantic-core = ">=2.18.2" sounddevice = { version = "^0.4.6", optional = true} typing_extensions = ">= 4.0.0" -websockets = "^13.1" +websockets = ">=12.0" [tool.poetry.group.dev.dependencies] mypy = "==1.13.0" diff --git a/reference.md b/reference.md index a8cd3886..67631787 100644 --- a/reference.md +++ b/reference.md @@ -1,6 +1,6 @@ # Reference -## EmpathicVoice ControlPlane -
client.empathic_voice.control_plane.send(...) +## Tts +
client.tts.synthesize_json(...)
@@ -12,7 +12,9 @@
-Send a message to a specific chat. +Synthesizes one or more input texts into speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. + +The response includes the base64-encoded audio and metadata in JSON format.
@@ -28,14 +30,28 @@ Send a message to a specific chat. ```python from hume import HumeClient -from hume.empathic_voice import SessionSettings +from hume.tts import FormatMp3, PostedContextWithUtterances, PostedUtterance client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.control_plane.send( - chat_id="chat_id", - request=SessionSettings(), +client.tts.synthesize_json( + context=PostedContextWithUtterances( + utterances=[ + PostedUtterance( + text="How can people see beauty so differently?", + description="A curious student with a clear and respectful tone, seeking clarification on Hume's ideas with a straightforward question.", + ) + ], + ), + format=FormatMp3(), + num_generations=1, + utterances=[ + PostedUtterance( + text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + description="Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.", + ) + ], ) ``` @@ -52,7 +68,11 @@ client.empathic_voice.control_plane.send(
-**chat_id:** `str` +**utterances:** `typing.Sequence[PostedUtterance]` + +A list of **Utterances** to be converted to speech output. + +An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
@@ -60,7 +80,7 @@ client.empathic_voice.control_plane.send(
-**request:** `ControlPlanePublishEvent` +**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output.
@@ -68,82 +88,43 @@ client.empathic_voice.control_plane.send(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**format:** `typing.Optional[Format]` — Specifies the output audio file format.
- -
- - - - -
- -## EmpathicVoice Tools -
client.empathic_voice.tools.list_tools(...) -
-
- -#### 📝 Description - -
-
-Fetches a paginated list of **Tools**. - -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. -
-
+**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. Only supported for Octave 2 requests. +
-#### 🔌 Usage - -
-
-
-```python -from hume import HumeClient +**num_generations:** `typing.Optional[int]` -client = HumeClient( - api_key="YOUR_API_KEY", -) -response = client.empathic_voice.tools.list_tools( - page_number=0, - page_size=2, -) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page +Number of audio generations to produce from the input utterances. -``` -
-
+Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. +
-#### ⚙️ Parameters -
-
-
+**split_utterances:** `typing.Optional[bool]` -**page_number:** `typing.Optional[int]` +Controls how audio output is segmented in the response. -Specifies the page number to retrieve, enabling pagination. +- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. + +This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output.
@@ -151,11 +132,7 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. +**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable).
@@ -163,7 +140,13 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false. +**version:** `typing.Optional[OctaveVersion]` + +Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. + +Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. + +For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview.
@@ -171,7 +154,12 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**name:** `typing.Optional[str]` — Filter to only include tools with name. +**instant_mode:** `typing.Optional[bool]` + +Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). +- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. +- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). +- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted).
@@ -191,7 +179,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.empathic_voice.tools.create_tool(...) +
client.tts.synthesize_file(...)
@@ -203,9 +191,9 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). +Synthesizes one or more input texts into speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +The response contains the generated audio file in the requested format.
@@ -221,16 +209,23 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca ```python from hume import HumeClient +from hume.tts import FormatMp3, PostedContextWithGenerationId, PostedUtterance client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.tools.create_tool( - name="get_current_weather", - parameters='{ "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "format": { "type": "string", "enum": ["celsius", "fahrenheit"], "description": "The temperature unit to use. Infer this from the users location." } }, "required": ["location", "format"] }', - version_description="Fetches current weather and uses celsius or fahrenheit based on location of user.", - description="This tool is for getting the current weather.", - fallback_content="Unable to fetch current weather.", +client.tts.synthesize_file( + context=PostedContextWithGenerationId( + generation_id="09ad914d-8e7f-40f8-a279-e34f07f7dab2", + ), + format=FormatMp3(), + num_generations=1, + utterances=[ + PostedUtterance( + text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + description="Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.", + ) + ], ) ``` @@ -247,7 +242,11 @@ client.empathic_voice.tools.create_tool(
-**name:** `str` — Name applied to all versions of a particular Tool. +**utterances:** `typing.Sequence[PostedUtterance]` + +A list of **Utterances** to be converted to speech output. + +An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
@@ -255,11 +254,15 @@ client.empathic_voice.tools.create_tool(
-**parameters:** `str` +**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. + +
+
-Stringified JSON defining the parameters used by this version of the Tool. +
+
-These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. +**format:** `typing.Optional[Format]` — Specifies the output audio file format.
@@ -267,7 +270,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-**version_description:** `typing.Optional[str]` — An optional description of the Tool version. +**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. Only supported for Octave 2 requests.
@@ -275,7 +278,11 @@ These parameters define the inputs needed for the Tool's execution, including th
-**description:** `typing.Optional[str]` — An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. +**num_generations:** `typing.Optional[int]` + +Number of audio generations to produce from the input utterances. + +Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency.
@@ -283,7 +290,15 @@ These parameters define the inputs needed for the Tool's execution, including th
-**fallback_content:** `typing.Optional[str]` — Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. +**split_utterances:** `typing.Optional[bool]` + +Controls how audio output is segmented in the response. + +- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. + +- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. + +This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output.
@@ -291,7 +306,42 @@ These parameters define the inputs needed for the Tool's execution, including th
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). + +
+
+ +
+
+ +**version:** `typing.Optional[OctaveVersion]` + +Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. + +Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. + +For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. + +
+
+ +
+
+ +**instant_mode:** `typing.Optional[bool]` + +Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). +- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. +- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). +- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -303,7 +353,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-
client.empathic_voice.tools.list_tool_versions(...) +
client.tts.synthesize_file_streaming(...)
@@ -315,9 +365,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-Fetches a list of a **Tool's** versions. - -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody.
@@ -333,18 +381,22 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca ```python from hume import HumeClient +from hume.tts import PostedUtterance, PostedUtteranceVoiceWithName client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.tools.list_tool_versions( - id="00183a3f-79ba-413d-9f3b-609864268bea", +client.tts.synthesize_file_streaming( + utterances=[ + PostedUtterance( + text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + voice=PostedUtteranceVoiceWithName( + name="Male English Actor", + provider="HUME_AI", + ), + ) + ], ) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ``` @@ -360,7 +412,11 @@ for page in response.iter_pages():
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. +**utterances:** `typing.Sequence[PostedUtterance]` + +A list of **Utterances** to be converted to speech output. + +An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
@@ -368,11 +424,7 @@ for page in response.iter_pages():
-**page_number:** `typing.Optional[int]` - -Specifies the page number to retrieve, enabling pagination. - -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output.
@@ -380,11 +432,15 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. +**format:** `typing.Optional[Format]` — Specifies the output audio file format. + +
+
-For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. +
+
+ +**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. Only supported for Octave 2 requests.
@@ -392,7 +448,11 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false. +**num_generations:** `typing.Optional[int]` + +Number of audio generations to produce from the input utterances. + +Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency.
@@ -400,7 +460,58 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**split_utterances:** `typing.Optional[bool]` + +Controls how audio output is segmented in the response. + +- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. + +- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. + +This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. + +
+
+ +
+
+ +**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). + +
+
+ +
+
+ +**version:** `typing.Optional[OctaveVersion]` + +Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. + +Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. + +For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. + +
+
+ +
+
+ +**instant_mode:** `typing.Optional[bool]` + +Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). +- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. +- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). +- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response.
@@ -412,7 +523,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.empathic_voice.tools.create_tool_version(...) +
client.tts.synthesize_json_streaming(...)
@@ -424,9 +535,9 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Updates a **Tool** by creating a new version of the **Tool**. +Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +The response is a stream of JSON objects including audio encoded in base64.
@@ -442,17 +553,24 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca ```python from hume import HumeClient +from hume.tts import PostedUtterance, PostedUtteranceVoiceWithName client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.tools.create_tool_version( - id="00183a3f-79ba-413d-9f3b-609864268bea", - parameters='{ "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "format": { "type": "string", "enum": ["celsius", "fahrenheit", "kelvin"], "description": "The temperature unit to use. Infer this from the users location." } }, "required": ["location", "format"] }', - version_description="Fetches current weather and uses celsius, fahrenheit, or kelvin based on location of user.", - fallback_content="Unable to fetch current weather.", - description="This tool is for getting the current weather.", +response = client.tts.synthesize_json_streaming( + utterances=[ + PostedUtterance( + text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + voice=PostedUtteranceVoiceWithName( + name="Male English Actor", + provider="HUME_AI", + ), + ) + ], ) +for chunk in response.data: + yield chunk ``` @@ -468,19 +586,11 @@ client.empathic_voice.tools.create_tool_version(
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. - -
-
- -
-
- -**parameters:** `str` +**utterances:** `typing.Sequence[PostedUtterance]` -Stringified JSON defining the parameters used by this version of the Tool. +A list of **Utterances** to be converted to speech output. -These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. +An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`.
@@ -488,7 +598,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-**version_description:** `typing.Optional[str]` — An optional description of the Tool version. +**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output.
@@ -496,7 +606,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-**description:** `typing.Optional[str]` — An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. +**format:** `typing.Optional[Format]` — Specifies the output audio file format.
@@ -504,7 +614,7 @@ These parameters define the inputs needed for the Tool's execution, including th
-**fallback_content:** `typing.Optional[str]` — Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. +**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. Only supported for Octave 2 requests.
@@ -512,71 +622,62 @@ These parameters define the inputs needed for the Tool's execution, including th
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- -
+**num_generations:** `typing.Optional[int]` +Number of audio generations to produce from the input utterances. +Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + -
-
client.empathic_voice.tools.delete_tool(...)
-#### 📝 Description +**split_utterances:** `typing.Optional[bool]` -
-
+Controls how audio output is segmented in the response. -
-
+- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. -Deletes a **Tool** and its versions. +- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. -
-
+This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. +
-#### 🔌 Usage -
+**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). + +
+
+
-```python -from hume import HumeClient +**version:** `typing.Optional[OctaveVersion]` -client = HumeClient( - api_key="YOUR_API_KEY", -) -client.empathic_voice.tools.delete_tool( - id="00183a3f-79ba-413d-9f3b-609864268bea", -) +Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. -``` -
-
+Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. + +For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. +
-#### ⚙️ Parameters -
-
-
+**instant_mode:** `typing.Optional[bool]` -**id:** `str` — Identifier for a Tool. Formatted as a UUID. +Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). +- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. +- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). +- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted).
@@ -596,11 +697,11 @@ client.empathic_voice.tools.delete_tool(
-
client.empathic_voice.tools.update_tool_name(...) +
client.tts.convert_voice_json(...)
-#### 📝 Description +#### 🔌 Usage
@@ -608,15 +709,23 @@ client.empathic_voice.tools.delete_tool(
-Updates the name of a **Tool**. +```python +from hume import HumeClient -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +client = HumeClient( + api_key="YOUR_API_KEY", +) +response = client.tts.convert_voice_json() +for chunk in response.data: + yield chunk + +```
-#### 🔌 Usage +#### ⚙️ Parameters
@@ -624,32 +733,41 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
-```python -from hume import HumeClient +**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). + +
+
-client = HumeClient( - api_key="YOUR_API_KEY", -) -client.empathic_voice.tools.update_tool_name( - id="00183a3f-79ba-413d-9f3b-609864268bea", - name="get_current_temperature", -) +
+
-``` +**audio:** `from __future__ import annotations + +typing.Optional[core.File]` — See core.File for more documentation +
+ +
+
+ +**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. +
-#### ⚙️ Parameters -
+**voice:** `typing.Optional[PostedUtteranceVoice]` + +
+
+
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. +**format:** `typing.Optional[Format]` — Specifies the output audio file format.
@@ -657,7 +775,7 @@ client.empathic_voice.tools.update_tool_name(
-**name:** `str` — Name applied to all versions of a particular Tool. +**include_timestamp_types:** `typing.Optional[typing.List[TimestampType]]` — The set of timestamp types to include in the response.
@@ -677,7 +795,8 @@ client.empathic_voice.tools.update_tool_name(
-
client.empathic_voice.tools.get_tool_version(...) +## Tts Voices +
client.tts.voices.list(...)
@@ -689,9 +808,7 @@ client.empathic_voice.tools.update_tool_name(
-Fetches a specified version of a **Tool**. - -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +Lists voices you have saved in your account, or voices from the [Voice Library](https://platform.hume.ai/tts/voice-library).
@@ -711,10 +828,14 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.tools.get_tool_version( - id="00183a3f-79ba-413d-9f3b-609864268bea", - version=1, +response = client.tts.voices.list( + provider="CUSTOM_VOICE", ) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page ``` @@ -730,7 +851,12 @@ client.empathic_voice.tools.get_tool_version(
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. +**provider:** `VoiceProvider` + +Specify the voice provider to filter voices returned by the endpoint: + +- **`HUME_AI`**: Lists preset, shared voices from Hume's [Voice Library](https://platform.hume.ai/tts/voice-library). +- **`CUSTOM_VOICE`**: Lists custom voices created and saved to your account.
@@ -738,13 +864,31 @@ client.empathic_voice.tools.get_tool_version(
-**version:** `int` +**page_number:** `typing.Optional[int]` -Version number for a Tool. +Specifies the page number to retrieve, enabling pagination. -Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + +
+
-Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. +
+
+ +**page_size:** `typing.Optional[int]` + +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + +
+
+ +
+
+ +**ascending_order:** `typing.Optional[bool]`
@@ -764,7 +908,7 @@ Version numbers are integer values representing different iterations of the Tool
-
client.empathic_voice.tools.delete_tool_version(...) +
client.tts.voices.create(...)
@@ -776,9 +920,9 @@ Version numbers are integer values representing different iterations of the Tool
-Deletes a specified version of a **Tool**. +Saves a new custom voice to your account using the specified TTS generation ID. -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +Once saved, this voice can be reused in subsequent TTS requests, ensuring consistent speech style and prosody. For more details on voice creation, see the [Voices Guide](/docs/text-to-speech-tts/voices).
@@ -798,9 +942,9 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.tools.delete_tool_version( - id="00183a3f-79ba-413d-9f3b-609864268bea", - version=1, +client.tts.voices.create( + generation_id="795c949a-1510-4a80-9646-7d0863b023ab", + name="David Hume", ) ``` @@ -817,7 +961,7 @@ client.empathic_voice.tools.delete_tool_version(
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. +**generation_id:** `str` — A unique ID associated with this TTS generation that can be used as context for generating consistent speech style and prosody across multiple requests.
@@ -825,13 +969,7 @@ client.empathic_voice.tools.delete_tool_version(
-**version:** `int` - -Version number for a Tool. - -Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. - -Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. +**name:** `str` — Name of the voice in the `Voice Library`.
@@ -851,7 +989,7 @@ Version numbers are integer values representing different iterations of the Tool
-
client.empathic_voice.tools.update_tool_description(...) +
client.tts.voices.delete(...)
@@ -863,9 +1001,7 @@ Version numbers are integer values representing different iterations of the Tool
-Updates the description of a specified **Tool** version. - -Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +Deletes a previously generated custom voice.
@@ -885,10 +1021,8 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.tools.update_tool_description( - id="00183a3f-79ba-413d-9f3b-609864268bea", - version=1, - version_description="Fetches current temperature, precipitation, wind speed, AQI, and other weather conditions. Uses Celsius, Fahrenheit, or kelvin depending on user's region.", +client.tts.voices.delete( + name="David Hume", ) ``` @@ -905,7 +1039,7 @@ client.empathic_voice.tools.update_tool_description(
-**id:** `str` — Identifier for a Tool. Formatted as a UUID. +**name:** `str` — Name of the voice to delete
@@ -913,13 +1047,72 @@ client.empathic_voice.tools.update_tool_description(
-**version:** `int` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
-Version number for a Tool. -Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + + +
-Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. +## EmpathicVoice ControlPlane +
client.empathic_voice.control_plane.send(...) +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Send a message to a specific chat. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from hume import HumeClient +from hume.empathic_voice import SessionSettings + +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.control_plane.send( + chat_id="chat_id", + request=SessionSettings(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**chat_id:** `str`
@@ -927,7 +1120,7 @@ Version numbers are integer values representing different iterations of the Tool
-**version_description:** `typing.Optional[str]` — An optional description of the Tool version. +**request:** `ControlPlanePublishEvent`
@@ -947,8 +1140,8 @@ Version numbers are integer values representing different iterations of the Tool
-## EmpathicVoice Prompts -
client.empathic_voice.prompts.list_prompts(...) +## EmpathicVoice ChatGroups +
client.empathic_voice.chat_groups.list_chat_groups(...)
@@ -960,9 +1153,7 @@ Version numbers are integer values representing different iterations of the Tool
-Fetches a paginated list of **Prompts**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a paginated list of **Chat Groups**.
@@ -982,9 +1173,11 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.prompts.list_prompts( +response = client.empathic_voice.chat_groups.list_chat_groups( page_number=0, - page_size=2, + page_size=1, + ascending_order=True, + config_id="1b60e1a0-cc59-424a-8d2c-189d354db3f3", ) for item in response: yield item @@ -1030,7 +1223,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**restrict_to_most_recent:** `typing.Optional[bool]` — Only include the most recent version of each prompt in the list. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1038,7 +1231,11 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**name:** `typing.Optional[str]` — Filter to only include prompts with name. +**config_id:** `typing.Optional[str]` + +The unique identifier for an EVI configuration. + +Filter Chat Groups to only include Chats that used this `config_id` in their most recent Chat.
@@ -1058,7 +1255,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.empathic_voice.prompts.create_prompt(...) +
client.empathic_voice.chat_groups.get_chat_group(...)
@@ -1070,9 +1267,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**.
@@ -1092,9 +1287,11 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.create_prompt( - name="Weather Assistant Prompt", - text="You are an AI weather assistant providing users with accurate and up-to-date weather information. Respond to user queries concisely and clearly. Use simple language and avoid technical jargon. Provide temperature, precipitation, wind conditions, and any weather alerts. Include helpful tips if severe weather is expected.", +client.empathic_voice.chat_groups.get_chat_group( + id="697056f0-6c7e-487d-9bd8-9c19df79f05f", + page_number=0, + page_size=1, + ascending_order=True, ) ``` @@ -1111,7 +1308,7 @@ client.empathic_voice.prompts.create_prompt(
-**name:** `str` — Name applied to all versions of a particular Prompt. +**id:** `str` — Identifier for a Chat Group. Formatted as a UUID.
@@ -1119,13 +1316,23 @@ client.empathic_voice.prompts.create_prompt(
-**text:** `str` +**page_size:** `typing.Optional[int]` -Instructions used to shape EVI's behavior, responses, and style. +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. -You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + +
+
-For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). +
+
+ +**page_number:** `typing.Optional[int]` + +Specifies the page number to retrieve, enabling pagination. + +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
@@ -1133,7 +1340,7 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-**version_description:** `typing.Optional[str]` — An optional description of the Prompt version. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1153,7 +1360,7 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-
client.empathic_voice.prompts.list_prompt_versions(...) +
client.empathic_voice.chat_groups.get_audio(...)
@@ -1165,9 +1372,7 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-Fetches a list of a **Prompt's** versions. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi).
@@ -1187,8 +1392,11 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.list_prompt_versions( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", +client.empathic_voice.chat_groups.get_audio( + id="369846cf-6ad5-404d-905e-a8acb5cdfc78", + page_number=0, + page_size=10, + ascending_order=True, ) ``` @@ -1205,7 +1413,7 @@ client.empathic_voice.prompts.list_prompt_versions(
-**id:** `str` — Identifier for a Prompt. Formatted as a UUID. +**id:** `str` — Identifier for a Chat Group. Formatted as a UUID.
@@ -1237,7 +1445,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each prompt. To include all versions of each prompt in the list, set `restrict_to_most_recent` to false. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1257,7 +1465,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.empathic_voice.prompts.create_prompt_version(...) +
client.empathic_voice.chat_groups.list_chat_group_events(...)
@@ -1269,9 +1477,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Updates a **Prompt** by creating a new version of the **Prompt**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a paginated list of **Chat** events associated with a **Chat Group**.
@@ -1291,11 +1497,17 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.create_prompt_version( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", - text="You are an updated version of an AI weather assistant providing users with accurate and up-to-date weather information. Respond to user queries concisely and clearly. Use simple language and avoid technical jargon. Provide temperature, precipitation, wind conditions, and any weather alerts. Include helpful tips if severe weather is expected.", - version_description="This is an updated version of the Weather Assistant Prompt.", +response = client.empathic_voice.chat_groups.list_chat_group_events( + id="697056f0-6c7e-487d-9bd8-9c19df79f05f", + page_number=0, + page_size=3, + ascending_order=True, ) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page ``` @@ -1311,7 +1523,7 @@ client.empathic_voice.prompts.create_prompt_version(
-**id:** `str` — Identifier for a Prompt. Formatted as a UUID. +**id:** `str` — Identifier for a Chat Group. Formatted as a UUID.
@@ -1319,13 +1531,23 @@ client.empathic_voice.prompts.create_prompt_version(
-**text:** `str` +**page_size:** `typing.Optional[int]` -Instructions used to shape EVI's behavior, responses, and style for this version of the Prompt. +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. -You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + +
+
-For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). +
+
+ +**page_number:** `typing.Optional[int]` + +Specifies the page number to retrieve, enabling pagination. + +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
@@ -1333,7 +1555,7 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-**version_description:** `typing.Optional[str]` — An optional description of the Prompt version. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1353,7 +1575,8 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-
client.empathic_voice.prompts.delete_prompt(...) +## EmpathicVoice Chats +
client.empathic_voice.chats.list_chats(...)
@@ -1365,9 +1588,7 @@ For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-spee
-Deletes a **Prompt** and its versions. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a paginated list of **Chats**.
@@ -1387,11 +1608,18 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.delete_prompt( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", -) - -``` +response = client.empathic_voice.chats.list_chats( + page_number=0, + page_size=1, + ascending_order=True, +) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page + +```
@@ -1405,80 +1633,31 @@ client.empathic_voice.prompts.delete_prompt(
-**id:** `str` — Identifier for a Prompt. Formatted as a UUID. - -
-
+**page_number:** `typing.Optional[int]` -
-
+Specifies the page number to retrieve, enabling pagination. -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
- - - - - - -
- -
client.empathic_voice.prompts.update_prompt_name(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Updates the name of a **Prompt**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. -
-
-
-
- -#### 🔌 Usage - -
-
-```python -from hume import HumeClient +**page_size:** `typing.Optional[int]` -client = HumeClient( - api_key="YOUR_API_KEY", -) -client.empathic_voice.prompts.update_prompt_name( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", - name="Updated Weather Assistant Prompt Name", -) +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. -``` -
-
+For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` — Identifier for a Prompt. Formatted as a UUID. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1486,7 +1665,7 @@ client.empathic_voice.prompts.update_prompt_name(
-**name:** `str` — Name applied to all versions of a particular Prompt. +**config_id:** `typing.Optional[str]` — Filter to only include chats that used this config.
@@ -1506,7 +1685,7 @@ client.empathic_voice.prompts.update_prompt_name(
-
client.empathic_voice.prompts.get_prompt_version(...) +
client.empathic_voice.chats.list_chat_events(...)
@@ -1518,9 +1697,7 @@ client.empathic_voice.prompts.update_prompt_name(
-Fetches a specified version of a **Prompt**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches a paginated list of **Chat** events.
@@ -1540,10 +1717,17 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.get_prompt_version( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", - version=0, +response = client.empathic_voice.chats.list_chat_events( + id="470a49f6-1dec-4afe-8b61-035d3b2d63b0", + page_number=0, + page_size=3, + ascending_order=True, ) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page ``` @@ -1559,7 +1743,7 @@ client.empathic_voice.prompts.get_prompt_version(
-**id:** `str` — Identifier for a Prompt. Formatted as a UUID. +**id:** `str` — Identifier for a Chat. Formatted as a UUID.
@@ -1567,86 +1751,23 @@ client.empathic_voice.prompts.get_prompt_version(
-**version:** `int` - -Version number for a Prompt. - -Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. - -Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. - -
-
+**page_size:** `typing.Optional[int]` -
-
+Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. -**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10.
- -
- - - - -
- -
client.empathic_voice.prompts.delete_prompt_version(...) -
-
- -#### 📝 Description - -
-
- -
-
- -Deletes a specified version of a **Prompt**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. -
-
-
-
- -#### 🔌 Usage - -
-
-```python -from hume import HumeClient - -client = HumeClient( - api_key="YOUR_API_KEY", -) -client.empathic_voice.prompts.delete_prompt_version( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", - version=1, -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
+**page_number:** `typing.Optional[int]` -
-
+Specifies the page number to retrieve, enabling pagination. -**id:** `str` — Identifier for a Prompt. Formatted as a UUID. +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
@@ -1654,13 +1775,7 @@ client.empathic_voice.prompts.delete_prompt_version(
-**version:** `int` - -Version number for a Prompt. - -Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. - -Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. +**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true.
@@ -1680,7 +1795,7 @@ Version numbers are integer values representing different iterations of the Prom
-
client.empathic_voice.prompts.update_prompt_description(...) +
client.empathic_voice.chats.get_audio(...)
@@ -1692,9 +1807,7 @@ Version numbers are integer values representing different iterations of the Prom
-Updates the description of a **Prompt**. - -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +Fetches the audio of a previous **Chat**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi).
@@ -1714,10 +1827,8 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.prompts.update_prompt_description( - id="af699d45-2985-42cc-91b9-af9e5da3bac5", - version=1, - version_description="This is an updated version_description.", +client.empathic_voice.chats.get_audio( + id="470a49f6-1dec-4afe-8b61-035d3b2d63b0", ) ``` @@ -1734,29 +1845,7 @@ client.empathic_voice.prompts.update_prompt_description(
-**id:** `str` — Identifier for a Prompt. Formatted as a UUID. - -
-
- -
-
- -**version:** `int` - -Version number for a Prompt. - -Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. - -Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. - -
-
- -
-
- -**version_description:** `typing.Optional[str]` — An optional description of the Prompt version. +**id:** `str` — Identifier for a chat. Formatted as a UUID.
@@ -1990,7 +2079,7 @@ client.empathic_voice.configs.create_config(
-**version_description:** `typing.Optional[str]` — An optional description of the Config version. +**builtin_tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]]` — List of built-in tools associated with this Config.
@@ -1998,7 +2087,11 @@ client.empathic_voice.configs.create_config(
-**prompt:** `typing.Optional[PostedConfigPromptSpec]` +**ellm_model:** `typing.Optional[PostedEllmModel]` + +The eLLM setup associated with this Config. + +Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
@@ -2006,7 +2099,7 @@ client.empathic_voice.configs.create_config(
-**voice:** `typing.Optional[VoiceRef]` — A voice specification associated with this Config. +**event_messages:** `typing.Optional[PostedEventMessageSpecs]`
@@ -2026,11 +2119,7 @@ This model is used to generate longer, more detailed responses from EVI. Choosin
-**ellm_model:** `typing.Optional[PostedEllmModel]` - -The eLLM setup associated with this Config. - -Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. +**nudges:** `typing.Optional[PostedNudgeSpec]` — Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues.
@@ -2038,7 +2127,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]]` — List of user-defined tools associated with this Config. +**prompt:** `typing.Optional[PostedConfigPromptSpec]`
@@ -2046,7 +2135,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**builtin_tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]]` — List of built-in tools associated with this Config. +**timeouts:** `typing.Optional[PostedTimeoutSpecs]`
@@ -2054,7 +2143,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**event_messages:** `typing.Optional[PostedEventMessageSpecs]` +**tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]]` — List of user-defined tools associated with this Config.
@@ -2062,7 +2151,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**nudges:** `typing.Optional[PostedNudgeSpec]` — Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. +**version_description:** `typing.Optional[str]` — An optional description of the Config version.
@@ -2070,7 +2159,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**timeouts:** `typing.Optional[PostedTimeoutSpecs]` +**voice:** `typing.Optional[VoiceRef]` — A voice specification associated with this Config.
@@ -2315,7 +2404,7 @@ client.empathic_voice.configs.create_config_version(
-**version_description:** `typing.Optional[str]` — An optional description of the Config version. +**builtin_tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]]` — List of built-in tools associated with this Config version.
@@ -2323,7 +2412,11 @@ client.empathic_voice.configs.create_config_version(
-**prompt:** `typing.Optional[PostedConfigPromptSpec]` +**ellm_model:** `typing.Optional[PostedEllmModel]` + +The eLLM setup associated with this Config version. + +Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody.
@@ -2331,7 +2424,7 @@ client.empathic_voice.configs.create_config_version(
-**voice:** `typing.Optional[VoiceRef]` — A voice specification associated with this Config version. +**event_messages:** `typing.Optional[PostedEventMessageSpecs]`
@@ -2351,11 +2444,7 @@ This model is used to generate longer, more detailed responses from EVI. Choosin
-**ellm_model:** `typing.Optional[PostedEllmModel]` - -The eLLM setup associated with this Config version. - -Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. +**nudges:** `typing.Optional[PostedNudgeSpec]`
@@ -2363,7 +2452,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]]` — List of user-defined tools associated with this Config version. +**prompt:** `typing.Optional[PostedConfigPromptSpec]`
@@ -2371,7 +2460,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**builtin_tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]]` — List of built-in tools associated with this Config version. +**timeouts:** `typing.Optional[PostedTimeoutSpecs]`
@@ -2379,7 +2468,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**event_messages:** `typing.Optional[PostedEventMessageSpecs]` +**tools:** `typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]]` — List of user-defined tools associated with this Config version.
@@ -2387,7 +2476,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**timeouts:** `typing.Optional[PostedTimeoutSpecs]` +**version_description:** `typing.Optional[str]` — An optional description of the Config version.
@@ -2395,7 +2484,7 @@ Hume's eLLM (empathic Large Language Model) is a multimodal language model that
-**nudges:** `typing.Optional[PostedNudgeSpec]` +**voice:** `typing.Optional[VoiceRef]` — A voice specification associated with this Config version.
@@ -2846,8 +2935,8 @@ Version numbers are integer values representing different iterations of the Conf
-## EmpathicVoice Chats -
client.empathic_voice.chats.list_chats(...) +## EmpathicVoice Prompts +
client.empathic_voice.prompts.list_prompts(...)
@@ -2859,7 +2948,9 @@ Version numbers are integer values representing different iterations of the Conf
-Fetches a paginated list of **Chats**. +Fetches a paginated list of **Prompts**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -2879,10 +2970,9 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.chats.list_chats( +response = client.empathic_voice.prompts.list_prompts( page_number=0, - page_size=1, - ascending_order=True, + page_size=2, ) for item in response: yield item @@ -2928,7 +3018,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. +**restrict_to_most_recent:** `typing.Optional[bool]` — Only include the most recent version of each prompt in the list.
@@ -2936,7 +3026,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**config_id:** `typing.Optional[str]` — Filter to only include chats that used this config. +**name:** `typing.Optional[str]` — Filter to only include prompts with name.
@@ -2956,7 +3046,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.empathic_voice.chats.list_chat_events(...) +
client.empathic_voice.prompts.create_prompt(...)
@@ -2968,7 +3058,9 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Fetches a paginated list of **Chat** events. +Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -2988,17 +3080,10 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.chats.list_chat_events( - id="470a49f6-1dec-4afe-8b61-035d3b2d63b0", - page_number=0, - page_size=3, - ascending_order=True, +client.empathic_voice.prompts.create_prompt( + name="Weather Assistant Prompt", + text="You are an AI weather assistant providing users with accurate and up-to-date weather information. Respond to user queries concisely and clearly. Use simple language and avoid technical jargon. Provide temperature, precipitation, wind conditions, and any weather alerts. Include helpful tips if severe weather is expected.", ) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ``` @@ -3014,7 +3099,7 @@ for page in response.iter_pages():
-**id:** `str` — Identifier for a Chat. Formatted as a UUID. +**name:** `str` — Name applied to all versions of a particular Prompt.
@@ -3022,23 +3107,13 @@ for page in response.iter_pages():
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - -
-
- -
-
+**text:** `str` -**page_number:** `typing.Optional[int]` +Instructions used to shape EVI's behavior, responses, and style. -Specifies the page number to retrieve, enabling pagination. +You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting).
@@ -3046,7 +3121,7 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. +**version_description:** `typing.Optional[str]` — An optional description of the Prompt version.
@@ -3066,7 +3141,7 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-
client.empathic_voice.chats.get_audio(...) +
client.empathic_voice.prompts.list_prompt_versions(...)
@@ -3078,7 +3153,9 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-Fetches the audio of a previous **Chat**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). +Fetches a list of a **Prompt's** versions. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3098,8 +3175,8 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.chats.get_audio( - id="470a49f6-1dec-4afe-8b61-035d3b2d63b0", +client.empathic_voice.prompts.list_prompt_versions( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", ) ``` @@ -3116,7 +3193,39 @@ client.empathic_voice.chats.get_audio(
-**id:** `str` — Identifier for a chat. Formatted as a UUID. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID. + +
+
+ +
+
+ +**page_number:** `typing.Optional[int]` + +Specifies the page number to retrieve, enabling pagination. + +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + +
+
+ +
+
+ +**page_size:** `typing.Optional[int]` + +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + +
+
+ +
+
+ +**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each prompt. To include all versions of each prompt in the list, set `restrict_to_most_recent` to false.
@@ -3136,8 +3245,7 @@ client.empathic_voice.chats.get_audio(
-## EmpathicVoice ChatGroups -
client.empathic_voice.chat_groups.list_chat_groups(...) +
client.empathic_voice.prompts.create_prompt_version(...)
@@ -3149,7 +3257,9 @@ client.empathic_voice.chats.get_audio(
-Fetches a paginated list of **Chat Groups**. +Updates a **Prompt** by creating a new version of the **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3169,17 +3279,11 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.chat_groups.list_chat_groups( - page_number=0, - page_size=1, - ascending_order=True, - config_id="1b60e1a0-cc59-424a-8d2c-189d354db3f3", +client.empathic_voice.prompts.create_prompt_version( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", + text="You are an updated version of an AI weather assistant providing users with accurate and up-to-date weather information. Respond to user queries concisely and clearly. Use simple language and avoid technical jargon. Provide temperature, precipitation, wind conditions, and any weather alerts. Include helpful tips if severe weather is expected.", + version_description="This is an updated version of the Weather Assistant Prompt.", ) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ``` @@ -3195,11 +3299,7 @@ for page in response.iter_pages():
-**page_number:** `typing.Optional[int]` - -Specifies the page number to retrieve, enabling pagination. - -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3207,19 +3307,13 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. +**text:** `str` -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - -
-
+Instructions used to shape EVI's behavior, responses, and style for this version of the Prompt. -
-
+You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. -**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. +For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting).
@@ -3227,11 +3321,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**config_id:** `typing.Optional[str]` - -The unique identifier for an EVI configuration. - -Filter Chat Groups to only include Chats that used this `config_id` in their most recent Chat. +**version_description:** `typing.Optional[str]` — An optional description of the Prompt version.
@@ -3251,7 +3341,7 @@ Filter Chat Groups to only include Chats that used this `config_id` in their mos
-
client.empathic_voice.chat_groups.get_chat_group(...) +
client.empathic_voice.prompts.delete_prompt(...)
@@ -3263,7 +3353,9 @@ Filter Chat Groups to only include Chats that used this `config_id` in their mos
-Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**. +Deletes a **Prompt** and its versions. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3283,11 +3375,8 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.chat_groups.get_chat_group( - id="697056f0-6c7e-487d-9bd8-9c19df79f05f", - page_number=0, - page_size=1, - ascending_order=True, +client.empathic_voice.prompts.delete_prompt( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", ) ``` @@ -3304,39 +3393,7 @@ client.empathic_voice.chat_groups.get_chat_group(
-**id:** `str` — Identifier for a Chat Group. Formatted as a UUID. - -
-
- -
-
- -**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - -
-
- -
-
- -**page_number:** `typing.Optional[int]` - -Specifies the page number to retrieve, enabling pagination. - -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - -
-
- -
-
- -**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3356,7 +3413,7 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-
client.empathic_voice.chat_groups.list_chat_group_events(...) +
client.empathic_voice.prompts.update_prompt_name(...)
@@ -3368,7 +3425,9 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-Fetches a paginated list of **Chat** events associated with a **Chat Group**. +Updates the name of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3388,17 +3447,10 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.empathic_voice.chat_groups.list_chat_group_events( - id="697056f0-6c7e-487d-9bd8-9c19df79f05f", - page_number=0, - page_size=3, - ascending_order=True, +client.empathic_voice.prompts.update_prompt_name( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", + name="Updated Weather Assistant Prompt Name", ) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ``` @@ -3414,7 +3466,7 @@ for page in response.iter_pages():
-**id:** `str` — Identifier for a Chat Group. Formatted as a UUID. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3422,11 +3474,7 @@ for page in response.iter_pages():
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. +**name:** `str` — Name applied to all versions of a particular Prompt.
@@ -3434,51 +3482,33 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-**page_number:** `typing.Optional[int]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
-Specifies the page number to retrieve, enabling pagination. -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - +
+
client.empathic_voice.prompts.get_prompt_version(...)
-**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. - -
-
+#### 📝 Description
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. - -
-
- - - - - - -
- -
client.empathic_voice.chat_groups.get_audio(...)
-#### 📝 Description - -
-
- -
-
+Fetches a specified version of a **Prompt**. -Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3498,11 +3528,9 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.empathic_voice.chat_groups.get_audio( - id="369846cf-6ad5-404d-905e-a8acb5cdfc78", - page_number=0, - page_size=10, - ascending_order=True, +client.empathic_voice.prompts.get_prompt_version( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", + version=0, ) ``` @@ -3519,19 +3547,7 @@ client.empathic_voice.chat_groups.get_audio(
-**id:** `str` — Identifier for a Chat Group. Formatted as a UUID. - -
-
- -
-
- -**page_number:** `typing.Optional[int]` - -Specifies the page number to retrieve, enabling pagination. - -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3539,19 +3555,13 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. +**version:** `int` -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - -
-
+Version number for a Prompt. -
-
+Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. -**ascending_order:** `typing.Optional[bool]` — Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -3571,8 +3581,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-## Tts -
client.tts.synthesize_json(...) +
client.empathic_voice.prompts.delete_prompt_version(...)
@@ -3584,9 +3593,9 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Synthesizes one or more input texts into speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. +Deletes a specified version of a **Prompt**. -The response includes the base64-encoded audio and metadata in JSON format. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -3602,28 +3611,13 @@ The response includes the base64-encoded audio and metadata in JSON format. ```python from hume import HumeClient -from hume.tts import FormatMp3, PostedContextWithUtterances, PostedUtterance client = HumeClient( api_key="YOUR_API_KEY", ) -client.tts.synthesize_json( - context=PostedContextWithUtterances( - utterances=[ - PostedUtterance( - text="How can people see beauty so differently?", - description="A curious student with a clear and respectful tone, seeking clarification on Hume's ideas with a straightforward question.", - ) - ], - ), - format=FormatMp3(), - num_generations=1, - utterances=[ - PostedUtterance( - text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - description="Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.", - ) - ], +client.empathic_voice.prompts.delete_prompt_version( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", + version=1, ) ``` @@ -3640,11 +3634,7 @@ client.tts.synthesize_json(
-**utterances:** `typing.Sequence[PostedUtterance]` - -A list of **Utterances** to be converted to speech output. - -An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`. +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3652,7 +3642,13 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. +**version:** `int` + +Version number for a Prompt. + +Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -3660,51 +3656,73 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**format:** `typing.Optional[Format]` — Specifies the output audio file format. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. -
+
+
client.empathic_voice.prompts.update_prompt_description(...)
-**num_generations:** `typing.Optional[int]` +#### 📝 Description -Number of audio generations to produce from the input utterances. +
+
-Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - +
+
+ +Updates the description of a **Prompt**. + +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +
+
+#### 🔌 Usage +
-**split_utterances:** `typing.Optional[bool]` - -Controls how audio output is segmented in the response. +
+
-- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. +```python +from hume import HumeClient -- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.prompts.update_prompt_description( + id="af699d45-2985-42cc-91b9-af9e5da3bac5", + version=1, + version_description="This is an updated version_description.", +) -This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. - +``` +
+
+#### ⚙️ Parameters +
-**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). +
+
+ +**id:** `str` — Identifier for a Prompt. Formatted as a UUID.
@@ -3712,13 +3730,13 @@ This setting affects how the `snippets` array is structured in the response, whi
-**version:** `typing.Optional[OctaveVersion]` +**version:** `int` -Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. +Version number for a Prompt. -Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. +Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. -For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -3726,12 +3744,7 @@ For a comparison of Octave versions, see the [Octave versions](/docs/text-to-spe
-**instant_mode:** `typing.Optional[bool]` - -Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). -- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. -- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). -- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). +**version_description:** `typing.Optional[str]` — An optional description of the Prompt version.
@@ -3751,7 +3764,8 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-
client.tts.synthesize_file(...) +## EmpathicVoice Tools +
client.empathic_voice.tools.list_tools(...)
@@ -3763,9 +3777,9 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-Synthesizes one or more input texts into speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. +Fetches a paginated list of **Tools**. -The response contains the generated audio file in the requested format. +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -3781,24 +3795,19 @@ The response contains the generated audio file in the requested format. ```python from hume import HumeClient -from hume.tts import FormatMp3, PostedContextWithGenerationId, PostedUtterance client = HumeClient( api_key="YOUR_API_KEY", ) -client.tts.synthesize_file( - context=PostedContextWithGenerationId( - generation_id="09ad914d-8e7f-40f8-a279-e34f07f7dab2", - ), - format=FormatMp3(), - num_generations=1, - utterances=[ - PostedUtterance( - text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - description="Middle-aged masculine voice with a clear, rhythmic Scots lilt, rounded vowels, and a warm, steady tone with an articulate, academic quality.", - ) - ], +response = client.empathic_voice.tools.list_tools( + page_number=0, + page_size=2, ) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page ``` @@ -3814,11 +3823,11 @@ client.tts.synthesize_file(
-**utterances:** `typing.Sequence[PostedUtterance]` +**page_number:** `typing.Optional[int]` -A list of **Utterances** to be converted to speech output. +Specifies the page number to retrieve, enabling pagination. -An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`. +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
@@ -3826,7 +3835,11 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. +**page_size:** `typing.Optional[int]` + +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10.
@@ -3834,7 +3847,7 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**format:** `typing.Optional[Format]` — Specifies the output audio file format. +**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false.
@@ -3842,7 +3855,7 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. +**name:** `typing.Optional[str]` — Filter to only include tools with name.
@@ -3850,35 +3863,75 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**num_generations:** `typing.Optional[int]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
-Number of audio generations to produce from the input utterances. -Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - +
+
client.empathic_voice.tools.create_tool(...)
-**split_utterances:** `typing.Optional[bool]` +#### 📝 Description -Controls how audio output is segmented in the response. +
+
-- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. +
+
-- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. +Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). -This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. - +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI. +
+
+#### 🔌 Usage +
-**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). +
+
+ +```python +from hume import HumeClient + +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.tools.create_tool( + name="get_current_weather", + parameters='{ "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "format": { "type": "string", "enum": ["celsius", "fahrenheit"], "description": "The temperature unit to use. Infer this from the users location." } }, "required": ["location", "format"] }', + version_description="Fetches current weather and uses celsius or fahrenheit based on location of user.", + description="This tool is for getting the current weather.", + fallback_content="Unable to fetch current weather.", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` — Name applied to all versions of a particular Tool.
@@ -3886,13 +3939,19 @@ This setting affects how the `snippets` array is structured in the response, whi
-**version:** `typing.Optional[OctaveVersion]` +**parameters:** `str` -Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. +Stringified JSON defining the parameters used by this version of the Tool. -Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. +These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. + +
+
-For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. +
+
+ +**description:** `typing.Optional[str]` — An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function.
@@ -3900,12 +3959,15 @@ For a comparison of Octave versions, see the [Octave versions](/docs/text-to-spe
-**instant_mode:** `typing.Optional[bool]` +**fallback_content:** `typing.Optional[str]` — Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + +
+
-Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). -- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. -- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). -- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). +
+
+ +**version_description:** `typing.Optional[str]` — An optional description of the Tool version.
@@ -3913,7 +3975,7 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3925,7 +3987,7 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-
client.tts.synthesize_file_streaming(...) +
client.empathic_voice.tools.list_tool_versions(...)
@@ -3937,7 +3999,9 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. +Fetches a list of a **Tool's** versions. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -3953,22 +4017,18 @@ Streams synthesized speech using the specified voice. If no voice is provided, a ```python from hume import HumeClient -from hume.tts import PostedUtterance, PostedUtteranceVoiceWithName client = HumeClient( api_key="YOUR_API_KEY", ) -client.tts.synthesize_file_streaming( - utterances=[ - PostedUtterance( - text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - voice=PostedUtteranceVoiceWithName( - name="Male English Actor", - provider="HUME_AI", - ), - ) - ], +response = client.empathic_voice.tools.list_tool_versions( + id="00183a3f-79ba-413d-9f3b-609864268bea", ) +for item in response: + yield item +# alternatively, you can paginate page-by-page +for page in response.iter_pages(): + yield page ``` @@ -3984,47 +4044,7 @@ client.tts.synthesize_file_streaming(
-**utterances:** `typing.Sequence[PostedUtterance]` - -A list of **Utterances** to be converted to speech output. - -An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`. - -
-
- -
-
- -**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. - -
-
- -
-
- -**format:** `typing.Optional[Format]` — Specifies the output audio file format. - -
-
- -
-
- -**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. - -
-
- -
-
- -**num_generations:** `typing.Optional[int]` - -Number of audio generations to produce from the input utterances. - -Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. +**id:** `str` — Identifier for a Tool. Formatted as a UUID.
@@ -4032,23 +4052,11 @@ Using `num_generations` enables faster processing than issuing multiple sequenti
-**split_utterances:** `typing.Optional[bool]` - -Controls how audio output is segmented in the response. - -- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. - -- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. - -This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. - -
-
+**page_number:** `typing.Optional[int]` -
-
+Specifies the page number to retrieve, enabling pagination. -**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). +This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page.
@@ -4056,13 +4064,11 @@ This setting affects how the `snippets` array is structured in the response, whi
-**version:** `typing.Optional[OctaveVersion]` - -Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. +**page_size:** `typing.Optional[int]` -Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. +Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. -For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. +For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10.
@@ -4070,12 +4076,7 @@ For a comparison of Octave versions, see the [Octave versions](/docs/text-to-spe
-**instant_mode:** `typing.Optional[bool]` - -Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). -- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. -- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). -- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). +**restrict_to_most_recent:** `typing.Optional[bool]` — By default, `restrict_to_most_recent` is set to true, returning only the latest version of each tool. To include all versions of each tool in the list, set `restrict_to_most_recent` to false.
@@ -4083,7 +4084,7 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4095,7 +4096,7 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-
client.tts.synthesize_json_streaming(...) +
client.empathic_voice.tools.create_tool_version(...)
@@ -4107,9 +4108,9 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-Streams synthesized speech using the specified voice. If no voice is provided, a novel voice will be generated dynamically. Optionally, additional context can be included to influence the speech's style and prosody. +Updates a **Tool** by creating a new version of the **Tool**. -The response is a stream of JSON objects including audio encoded in base64. +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -4124,25 +4125,18 @@ The response is a stream of JSON objects including audio encoded in base64.
```python -from hume import HumeClient -from hume.tts import PostedUtterance, PostedUtteranceVoiceWithName - -client = HumeClient( - api_key="YOUR_API_KEY", -) -response = client.tts.synthesize_json_streaming( - utterances=[ - PostedUtterance( - text="Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - voice=PostedUtteranceVoiceWithName( - name="Male English Actor", - provider="HUME_AI", - ), - ) - ], +from hume import HumeClient + +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.tools.create_tool_version( + id="00183a3f-79ba-413d-9f3b-609864268bea", + parameters='{ "type": "object", "properties": { "location": { "type": "string", "description": "The city and state, e.g. San Francisco, CA" }, "format": { "type": "string", "enum": ["celsius", "fahrenheit", "kelvin"], "description": "The temperature unit to use. Infer this from the users location." } }, "required": ["location", "format"] }', + version_description="Fetches current weather and uses celsius, fahrenheit, or kelvin based on location of user.", + fallback_content="Unable to fetch current weather.", + description="This tool is for getting the current weather.", ) -for chunk in response.data: - yield chunk ```
@@ -4158,11 +4152,19 @@ for chunk in response.data:
-**utterances:** `typing.Sequence[PostedUtterance]` +**id:** `str` — Identifier for a Tool. Formatted as a UUID. + +
+
-A list of **Utterances** to be converted to speech output. +
+
-An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overview), and includes input `text`, an optional `description` to serve as the prompt for how the speech should be delivered, an optional `voice` specification, and additional controls to guide delivery for `speed` and `trailing_silence`. +**parameters:** `str` + +Stringified JSON defining the parameters used by this version of the Tool. + +These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format.
@@ -4170,7 +4172,7 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. +**description:** `typing.Optional[str]` — An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function.
@@ -4178,7 +4180,7 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**format:** `typing.Optional[Format]` — Specifies the output audio file format. +**fallback_content:** `typing.Optional[str]` — Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors.
@@ -4186,7 +4188,7 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**include_timestamp_types:** `typing.Optional[typing.Sequence[TimestampType]]` — The set of timestamp types to include in the response. +**version_description:** `typing.Optional[str]` — An optional description of the Tool version.
@@ -4194,62 +4196,71 @@ An **Utterance** is a unit of input for [Octave](/docs/text-to-speech-tts/overvi
-**num_generations:** `typing.Optional[int]` +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
-Number of audio generations to produce from the input utterances. -Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. - +
+
client.empathic_voice.tools.delete_tool(...)
-**split_utterances:** `typing.Optional[bool]` +#### 📝 Description -Controls how audio output is segmented in the response. +
+
-- When **enabled** (`true`), input utterances are automatically split into natural-sounding speech segments. +
+
-- When **disabled** (`false`), the response maintains a strict one-to-one mapping between input utterances and output snippets. +Deletes a **Tool** and its versions. -This setting affects how the `snippets` array is structured in the response, which may be important for applications that need to track the relationship between input text and generated audio segments. When setting to `false`, avoid including utterances with long `text`, as this can result in distorted output. - +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
- -
-
- -**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). -
+#### 🔌 Usage +
-**version:** `typing.Optional[OctaveVersion]` +
+
-Selects the Octave model version used to synthesize speech for this request. If you omit this field, Hume automatically routes the request to the most appropriate model. Setting a specific version ensures stable and repeatable behavior across requests. +```python +from hume import HumeClient -Use `2` to opt into the latest Octave capabilities. When you specify version `2`, you must also provide a `voice`. Requests that set `version: 2` without a voice will be rejected. +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.tools.delete_tool( + id="00183a3f-79ba-413d-9f3b-609864268bea", +) -For a comparison of Octave versions, see the [Octave versions](/docs/text-to-speech-tts/overview#octave-versions) section in the TTS overview. - +``` +
+
+#### ⚙️ Parameters +
-**instant_mode:** `typing.Optional[bool]` +
+
-Enables ultra-low latency streaming, significantly reducing the time until the first audio chunk is received. Recommended for real-time applications requiring immediate audio playback. For further details, see our documentation on [instant mode](/docs/text-to-speech-tts/overview#ultra-low-latency-streaming-instant-mode). -- A [voice](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.utterances.voice) must be specified when instant mode is enabled. Dynamic voice generation is not supported with this mode. -- Instant mode is only supported for streaming endpoints (e.g., [/v0/tts/stream/json](/reference/text-to-speech-tts/synthesize-json-streaming), [/v0/tts/stream/file](/reference/text-to-speech-tts/synthesize-file-streaming)). -- Ensure only a single generation is requested ([num_generations](/reference/text-to-speech-tts/synthesize-json-streaming#request.body.num_generations) must be `1` or omitted). +**id:** `str` — Identifier for a Tool. Formatted as a UUID.
@@ -4269,11 +4280,11 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-
client.tts.convert_voice_json(...) +
client.empathic_voice.tools.update_tool_name(...)
-#### 🔌 Usage +#### 📝 Description
@@ -4281,23 +4292,15 @@ Enables ultra-low latency streaming, significantly reducing the time until the f
-```python -from hume import HumeClient - -client = HumeClient( - api_key="YOUR_API_KEY", -) -response = client.tts.convert_voice_json() -for chunk in response.data: - yield chunk +Updates the name of a **Tool**. -``` +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
-#### ⚙️ Parameters +#### 🔌 Usage
@@ -4305,41 +4308,32 @@ for chunk in response.data:
-**strip_headers:** `typing.Optional[bool]` — If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). - -
-
- -
-
+```python +from hume import HumeClient -**audio:** `from __future__ import annotations +client = HumeClient( + api_key="YOUR_API_KEY", +) +client.empathic_voice.tools.update_tool_name( + id="00183a3f-79ba-413d-9f3b-609864268bea", + name="get_current_temperature", +) -typing.Optional[core.File]` — See core.File for more documentation - +```
- -
-
- -**context:** `typing.Optional[PostedContext]` — Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. -
+#### ⚙️ Parameters +
-**voice:** `typing.Optional[PostedUtteranceVoice]` - -
-
-
-**format:** `typing.Optional[Format]` — Specifies the output audio file format. +**id:** `str` — Identifier for a Tool. Formatted as a UUID.
@@ -4347,7 +4341,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-**include_timestamp_types:** `typing.Optional[typing.List[TimestampType]]` — The set of timestamp types to include in the response. +**name:** `str` — Name applied to all versions of a particular Tool.
@@ -4367,8 +4361,7 @@ typing.Optional[core.File]` — See core.File for more documentation
-## Tts Voices -
client.tts.voices.list(...) +
client.empathic_voice.tools.get_tool_version(...)
@@ -4380,7 +4373,9 @@ typing.Optional[core.File]` — See core.File for more documentation
-Lists voices you have saved in your account, or voices from the [Voice Library](https://platform.hume.ai/tts/voice-library). +Fetches a specified version of a **Tool**. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -4400,14 +4395,10 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -response = client.tts.voices.list( - provider="CUSTOM_VOICE", +client.empathic_voice.tools.get_tool_version( + id="00183a3f-79ba-413d-9f3b-609864268bea", + version=1, ) -for item in response: - yield item -# alternatively, you can paginate page-by-page -for page in response.iter_pages(): - yield page ``` @@ -4423,24 +4414,7 @@ for page in response.iter_pages():
-**provider:** `VoiceProvider` - -Specify the voice provider to filter voices returned by the endpoint: - -- **`HUME_AI`**: Lists preset, shared voices from Hume's [Voice Library](https://platform.hume.ai/tts/voice-library). -- **`CUSTOM_VOICE`**: Lists custom voices created and saved to your account. - -
-
- -
-
- -**page_number:** `typing.Optional[int]` - -Specifies the page number to retrieve, enabling pagination. - -This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. +**id:** `str` — Identifier for a Tool. Formatted as a UUID.
@@ -4448,19 +4422,13 @@ This parameter uses zero-based indexing. For example, setting `page_number` to 0
-**page_size:** `typing.Optional[int]` - -Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. +**version:** `int` -For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - -
-
+Version number for a Tool. -
-
+Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. -**ascending_order:** `typing.Optional[bool]` +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
@@ -4480,7 +4448,7 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-
client.tts.voices.create(...) +
client.empathic_voice.tools.delete_tool_version(...)
@@ -4492,9 +4460,9 @@ For example, if `page_size` is set to 10, each page will include up to 10 items.
-Saves a new custom voice to your account using the specified TTS generation ID. +Deletes a specified version of a **Tool**. -Once saved, this voice can be reused in subsequent TTS requests, ensuring consistent speech style and prosody. For more details on voice creation, see the [Voices Guide](/docs/text-to-speech-tts/voices). +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -4514,9 +4482,9 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.tts.voices.create( - generation_id="795c949a-1510-4a80-9646-7d0863b023ab", - name="David Hume", +client.empathic_voice.tools.delete_tool_version( + id="00183a3f-79ba-413d-9f3b-609864268bea", + version=1, ) ``` @@ -4533,7 +4501,7 @@ client.tts.voices.create(
-**generation_id:** `str` — A unique ID associated with this TTS generation that can be used as context for generating consistent speech style and prosody across multiple requests. +**id:** `str` — Identifier for a Tool. Formatted as a UUID.
@@ -4541,7 +4509,13 @@ client.tts.voices.create(
-**name:** `str` — Name of the voice in the `Voice Library`. +**version:** `int` + +Version number for a Tool. + +Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number.
@@ -4561,7 +4535,7 @@ client.tts.voices.create(
-
client.tts.voices.delete(...) +
client.empathic_voice.tools.update_tool_description(...)
@@ -4573,7 +4547,9 @@ client.tts.voices.create(
-Deletes a previously generated custom voice. +Updates the description of a specified **Tool** version. + +Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-calling) guide for comprehensive instructions on defining and integrating tools into EVI.
@@ -4593,8 +4569,10 @@ from hume import HumeClient client = HumeClient( api_key="YOUR_API_KEY", ) -client.tts.voices.delete( - name="David Hume", +client.empathic_voice.tools.update_tool_description( + id="00183a3f-79ba-413d-9f3b-609864268bea", + version=1, + version_description="Fetches current temperature, precipitation, wind speed, AQI, and other weather conditions. Uses Celsius, Fahrenheit, or kelvin depending on user's region.", ) ``` @@ -4611,7 +4589,29 @@ client.tts.voices.delete(
-**name:** `str` — Name of the voice to delete +**id:** `str` — Identifier for a Tool. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `int` + +Version number for a Tool. + +Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + +Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. + +
+
+ +
+
+ +**version_description:** `typing.Optional[str]` — An optional description of the Tool version.
diff --git a/src/hume/base_client.py b/src/hume/base_client.py index 31bfb7be..0feb2d67 100644 --- a/src/hume/base_client.py +++ b/src/hume/base_client.py @@ -75,18 +75,10 @@ def __init__( else httpx.Client(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self._empathic_voice: typing.Optional[EmpathicVoiceClient] = None self._tts: typing.Optional[TtsClient] = None + self._empathic_voice: typing.Optional[EmpathicVoiceClient] = None self._expression_measurement: typing.Optional[ExpressionMeasurementClient] = None - @property - def empathic_voice(self): - if self._empathic_voice is None: - from .empathic_voice.client import EmpathicVoiceClient # noqa: E402 - - self._empathic_voice = EmpathicVoiceClient(client_wrapper=self._client_wrapper) - return self._empathic_voice - @property def tts(self): if self._tts is None: @@ -95,6 +87,14 @@ def tts(self): self._tts = TtsClient(client_wrapper=self._client_wrapper) return self._tts + @property + def empathic_voice(self): + if self._empathic_voice is None: + from .empathic_voice.client import EmpathicVoiceClient # noqa: E402 + + self._empathic_voice = EmpathicVoiceClient(client_wrapper=self._client_wrapper) + return self._empathic_voice + @property def expression_measurement(self): if self._expression_measurement is None: @@ -165,18 +165,10 @@ def __init__( else httpx.AsyncClient(timeout=_defaulted_timeout), timeout=_defaulted_timeout, ) - self._empathic_voice: typing.Optional[AsyncEmpathicVoiceClient] = None self._tts: typing.Optional[AsyncTtsClient] = None + self._empathic_voice: typing.Optional[AsyncEmpathicVoiceClient] = None self._expression_measurement: typing.Optional[AsyncExpressionMeasurementClient] = None - @property - def empathic_voice(self): - if self._empathic_voice is None: - from .empathic_voice.client import AsyncEmpathicVoiceClient # noqa: E402 - - self._empathic_voice = AsyncEmpathicVoiceClient(client_wrapper=self._client_wrapper) - return self._empathic_voice - @property def tts(self): if self._tts is None: @@ -185,6 +177,14 @@ def tts(self): self._tts = AsyncTtsClient(client_wrapper=self._client_wrapper) return self._tts + @property + def empathic_voice(self): + if self._empathic_voice is None: + from .empathic_voice.client import AsyncEmpathicVoiceClient # noqa: E402 + + self._empathic_voice = AsyncEmpathicVoiceClient(client_wrapper=self._client_wrapper) + return self._empathic_voice + @property def expression_measurement(self): if self._expression_measurement is None: diff --git a/src/hume/core/client_wrapper.py b/src/hume/core/client_wrapper.py index d58fb47b..f55c269f 100644 --- a/src/hume/core/client_wrapper.py +++ b/src/hume/core/client_wrapper.py @@ -23,10 +23,10 @@ def __init__( def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { - "User-Agent": "hume/0.13.4", + "User-Agent": "hume/0.13.5", "X-Fern-Language": "Python", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.13.4", + "X-Fern-SDK-Version": "0.13.5", **(self.get_custom_headers() or {}), } if self.api_key is not None: diff --git a/src/hume/empathic_voice/chat_groups/client.py b/src/hume/empathic_voice/chat_groups/client.py index 2225bab1..876a35e7 100644 --- a/src/hume/empathic_voice/chat_groups/client.py +++ b/src/hume/empathic_voice/chat_groups/client.py @@ -155,33 +155,33 @@ def get_chat_group( ) return _response.data - def list_chat_group_events( + def get_audio( self, id: str, *, - page_size: typing.Optional[int] = None, page_number: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[ReturnChatEvent]: + ) -> ReturnChatGroupPagedAudioReconstructions: """ - Fetches a paginated list of **Chat** events associated with a **Chat Group**. + Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_size : typing.Optional[int] - Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - - For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - page_number : typing.Optional[int] Specifies the page number to retrieve, enabling pagination. This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + page_size : typing.Optional[int] + Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + + For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -190,7 +190,7 @@ def list_chat_group_events( Returns ------- - SyncPager[ReturnChatEvent] + ReturnChatGroupPagedAudioReconstructions Success Examples @@ -200,53 +200,49 @@ def list_chat_group_events( client = HumeClient( api_key="YOUR_API_KEY", ) - response = client.empathic_voice.chat_groups.list_chat_group_events( - id="697056f0-6c7e-487d-9bd8-9c19df79f05f", + client.empathic_voice.chat_groups.get_audio( + id="369846cf-6ad5-404d-905e-a8acb5cdfc78", page_number=0, - page_size=3, + page_size=10, ascending_order=True, ) - for item in response: - yield item - # alternatively, you can paginate page-by-page - for page in response.iter_pages(): - yield page """ - return self._raw_client.list_chat_group_events( + _response = self._raw_client.get_audio( id, - page_size=page_size, page_number=page_number, + page_size=page_size, ascending_order=ascending_order, request_options=request_options, ) + return _response.data - def get_audio( + def list_chat_group_events( self, id: str, *, - page_number: typing.Optional[int] = None, page_size: typing.Optional[int] = None, + page_number: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> ReturnChatGroupPagedAudioReconstructions: + ) -> SyncPager[ReturnChatEvent]: """ - Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + Fetches a paginated list of **Chat** events associated with a **Chat Group**. Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_number : typing.Optional[int] - Specifies the page number to retrieve, enabling pagination. - - This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - page_size : typing.Optional[int] Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + page_number : typing.Optional[int] + Specifies the page number to retrieve, enabling pagination. + + This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -255,7 +251,7 @@ def get_audio( Returns ------- - ReturnChatGroupPagedAudioReconstructions + SyncPager[ReturnChatEvent] Success Examples @@ -265,21 +261,25 @@ def get_audio( client = HumeClient( api_key="YOUR_API_KEY", ) - client.empathic_voice.chat_groups.get_audio( - id="369846cf-6ad5-404d-905e-a8acb5cdfc78", + response = client.empathic_voice.chat_groups.list_chat_group_events( + id="697056f0-6c7e-487d-9bd8-9c19df79f05f", page_number=0, - page_size=10, + page_size=3, ascending_order=True, ) + for item in response: + yield item + # alternatively, you can paginate page-by-page + for page in response.iter_pages(): + yield page """ - _response = self._raw_client.get_audio( + return self._raw_client.list_chat_group_events( id, - page_number=page_number, page_size=page_size, + page_number=page_number, ascending_order=ascending_order, request_options=request_options, ) - return _response.data class AsyncChatGroupsClient: @@ -442,33 +442,33 @@ async def main() -> None: ) return _response.data - async def list_chat_group_events( + async def get_audio( self, id: str, *, - page_size: typing.Optional[int] = None, page_number: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[ReturnChatEvent]: + ) -> ReturnChatGroupPagedAudioReconstructions: """ - Fetches a paginated list of **Chat** events associated with a **Chat Group**. + Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_size : typing.Optional[int] - Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - - For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - page_number : typing.Optional[int] Specifies the page number to retrieve, enabling pagination. This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + page_size : typing.Optional[int] + Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + + For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -477,7 +477,7 @@ async def list_chat_group_events( Returns ------- - AsyncPager[ReturnChatEvent] + ReturnChatGroupPagedAudioReconstructions Success Examples @@ -492,57 +492,52 @@ async def list_chat_group_events( async def main() -> None: - response = await client.empathic_voice.chat_groups.list_chat_group_events( - id="697056f0-6c7e-487d-9bd8-9c19df79f05f", + await client.empathic_voice.chat_groups.get_audio( + id="369846cf-6ad5-404d-905e-a8acb5cdfc78", page_number=0, - page_size=3, + page_size=10, ascending_order=True, ) - async for item in response: - yield item - - # alternatively, you can paginate page-by-page - async for page in response.iter_pages(): - yield page asyncio.run(main()) """ - return await self._raw_client.list_chat_group_events( + _response = await self._raw_client.get_audio( id, - page_size=page_size, page_number=page_number, + page_size=page_size, ascending_order=ascending_order, request_options=request_options, ) + return _response.data - async def get_audio( + async def list_chat_group_events( self, id: str, *, - page_number: typing.Optional[int] = None, page_size: typing.Optional[int] = None, + page_number: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> ReturnChatGroupPagedAudioReconstructions: + ) -> AsyncPager[ReturnChatEvent]: """ - Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + Fetches a paginated list of **Chat** events associated with a **Chat Group**. Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_number : typing.Optional[int] - Specifies the page number to retrieve, enabling pagination. - - This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - page_size : typing.Optional[int] Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + page_number : typing.Optional[int] + Specifies the page number to retrieve, enabling pagination. + + This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -551,7 +546,7 @@ async def get_audio( Returns ------- - ReturnChatGroupPagedAudioReconstructions + AsyncPager[ReturnChatEvent] Success Examples @@ -566,21 +561,26 @@ async def get_audio( async def main() -> None: - await client.empathic_voice.chat_groups.get_audio( - id="369846cf-6ad5-404d-905e-a8acb5cdfc78", + response = await client.empathic_voice.chat_groups.list_chat_group_events( + id="697056f0-6c7e-487d-9bd8-9c19df79f05f", page_number=0, - page_size=10, + page_size=3, ascending_order=True, ) + async for item in response: + yield item + + # alternatively, you can paginate page-by-page + async for page in response.iter_pages(): + yield page asyncio.run(main()) """ - _response = await self._raw_client.get_audio( + return await self._raw_client.list_chat_group_events( id, - page_number=page_number, page_size=page_size, + page_number=page_number, ascending_order=ascending_order, request_options=request_options, ) - return _response.data diff --git a/src/hume/empathic_voice/chat_groups/raw_client.py b/src/hume/empathic_voice/chat_groups/raw_client.py index a513f7a7..a3db20e1 100644 --- a/src/hume/empathic_voice/chat_groups/raw_client.py +++ b/src/hume/empathic_voice/chat_groups/raw_client.py @@ -190,33 +190,33 @@ def get_chat_group( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def list_chat_group_events( + def get_audio( self, id: str, *, - page_size: typing.Optional[int] = None, page_number: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[ReturnChatEvent]: + ) -> HttpResponse[ReturnChatGroupPagedAudioReconstructions]: """ - Fetches a paginated list of **Chat** events associated with a **Chat Group**. + Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_size : typing.Optional[int] - Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - - For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - page_number : typing.Optional[int] Specifies the page number to retrieve, enabling pagination. This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + page_size : typing.Optional[int] + Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + + For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -225,43 +225,30 @@ def list_chat_group_events( Returns ------- - SyncPager[ReturnChatEvent] + HttpResponse[ReturnChatGroupPagedAudioReconstructions] Success """ - page_number = page_number if page_number is not None else 0 - _response = self._client_wrapper.httpx_client.request( - f"v0/evi/chat_groups/{jsonable_encoder(id)}/events", + f"v0/evi/chat_groups/{jsonable_encoder(id)}/audio", base_url=self._client_wrapper.get_environment().base, method="GET", params={ - "page_size": page_size, "page_number": page_number, + "page_size": page_size, "ascending_order": ascending_order, }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - ReturnChatGroupPagedEvents, + _data = typing.cast( + ReturnChatGroupPagedAudioReconstructions, parse_obj_as( - type_=ReturnChatGroupPagedEvents, # type: ignore + type_=ReturnChatGroupPagedAudioReconstructions, # type: ignore object_=_response.json(), ), ) - _items = _parsed_response.events_page - _has_next = True - _get_next = lambda: self.list_chat_group_events( - id, - page_size=page_size, - page_number=page_number + 1, - ascending_order=ascending_order, - request_options=request_options, - ) - return SyncPager( - has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response) - ) + return HttpResponse(response=_response, data=_data) if _response.status_code == 400: raise BadRequestError( headers=dict(_response.headers), @@ -278,33 +265,33 @@ def list_chat_group_events( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def get_audio( + def list_chat_group_events( self, id: str, *, - page_number: typing.Optional[int] = None, page_size: typing.Optional[int] = None, + page_number: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[ReturnChatGroupPagedAudioReconstructions]: + ) -> SyncPager[ReturnChatEvent]: """ - Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + Fetches a paginated list of **Chat** events associated with a **Chat Group**. Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_number : typing.Optional[int] - Specifies the page number to retrieve, enabling pagination. - - This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - page_size : typing.Optional[int] Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + page_number : typing.Optional[int] + Specifies the page number to retrieve, enabling pagination. + + This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -313,30 +300,43 @@ def get_audio( Returns ------- - HttpResponse[ReturnChatGroupPagedAudioReconstructions] + SyncPager[ReturnChatEvent] Success """ + page_number = page_number if page_number is not None else 0 + _response = self._client_wrapper.httpx_client.request( - f"v0/evi/chat_groups/{jsonable_encoder(id)}/audio", + f"v0/evi/chat_groups/{jsonable_encoder(id)}/events", base_url=self._client_wrapper.get_environment().base, method="GET", params={ - "page_number": page_number, "page_size": page_size, + "page_number": page_number, "ascending_order": ascending_order, }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: - _data = typing.cast( - ReturnChatGroupPagedAudioReconstructions, + _parsed_response = typing.cast( + ReturnChatGroupPagedEvents, parse_obj_as( - type_=ReturnChatGroupPagedAudioReconstructions, # type: ignore + type_=ReturnChatGroupPagedEvents, # type: ignore object_=_response.json(), ), ) - return HttpResponse(response=_response, data=_data) + _items = _parsed_response.events_page + _has_next = True + _get_next = lambda: self.list_chat_group_events( + id, + page_size=page_size, + page_number=page_number + 1, + ascending_order=ascending_order, + request_options=request_options, + ) + return SyncPager( + has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response) + ) if _response.status_code == 400: raise BadRequestError( headers=dict(_response.headers), @@ -527,33 +527,33 @@ async def get_chat_group( raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def list_chat_group_events( + async def get_audio( self, id: str, *, - page_size: typing.Optional[int] = None, page_number: typing.Optional[int] = None, + page_size: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[ReturnChatEvent]: + ) -> AsyncHttpResponse[ReturnChatGroupPagedAudioReconstructions]: """ - Fetches a paginated list of **Chat** events associated with a **Chat Group**. + Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_size : typing.Optional[int] - Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. - - For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. - page_number : typing.Optional[int] Specifies the page number to retrieve, enabling pagination. This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + page_size : typing.Optional[int] + Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. + + For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -562,46 +562,30 @@ async def list_chat_group_events( Returns ------- - AsyncPager[ReturnChatEvent] + AsyncHttpResponse[ReturnChatGroupPagedAudioReconstructions] Success """ - page_number = page_number if page_number is not None else 0 - _response = await self._client_wrapper.httpx_client.request( - f"v0/evi/chat_groups/{jsonable_encoder(id)}/events", + f"v0/evi/chat_groups/{jsonable_encoder(id)}/audio", base_url=self._client_wrapper.get_environment().base, method="GET", params={ - "page_size": page_size, "page_number": page_number, + "page_size": page_size, "ascending_order": ascending_order, }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: - _parsed_response = typing.cast( - ReturnChatGroupPagedEvents, + _data = typing.cast( + ReturnChatGroupPagedAudioReconstructions, parse_obj_as( - type_=ReturnChatGroupPagedEvents, # type: ignore + type_=ReturnChatGroupPagedAudioReconstructions, # type: ignore object_=_response.json(), ), ) - _items = _parsed_response.events_page - _has_next = True - - async def _get_next(): - return await self.list_chat_group_events( - id, - page_size=page_size, - page_number=page_number + 1, - ascending_order=ascending_order, - request_options=request_options, - ) - - return AsyncPager( - has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response) - ) + return AsyncHttpResponse(response=_response, data=_data) if _response.status_code == 400: raise BadRequestError( headers=dict(_response.headers), @@ -618,33 +602,33 @@ async def _get_next(): raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def get_audio( + async def list_chat_group_events( self, id: str, *, - page_number: typing.Optional[int] = None, page_size: typing.Optional[int] = None, + page_number: typing.Optional[int] = None, ascending_order: typing.Optional[bool] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[ReturnChatGroupPagedAudioReconstructions]: + ) -> AsyncPager[ReturnChatEvent]: """ - Fetches a paginated list of audio for each **Chat** within the specified **Chat Group**. For more details, see our guide on audio reconstruction [here](/docs/speech-to-speech-evi/faq#can-i-access-the-audio-of-previous-conversations-with-evi). + Fetches a paginated list of **Chat** events associated with a **Chat Group**. Parameters ---------- id : str Identifier for a Chat Group. Formatted as a UUID. - page_number : typing.Optional[int] - Specifies the page number to retrieve, enabling pagination. - - This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. - page_size : typing.Optional[int] Specifies the maximum number of results to include per page, enabling pagination. The value must be between 1 and 100, inclusive. For example, if `page_size` is set to 10, each page will include up to 10 items. Defaults to 10. + page_number : typing.Optional[int] + Specifies the page number to retrieve, enabling pagination. + + This parameter uses zero-based indexing. For example, setting `page_number` to 0 retrieves the first page of results (items 0-9 if `page_size` is 10), setting `page_number` to 1 retrieves the second page (items 10-19), and so on. Defaults to 0, which retrieves the first page. + ascending_order : typing.Optional[bool] Specifies the sorting order of the results based on their creation date. Set to true for ascending order (chronological, with the oldest records first) and false for descending order (reverse-chronological, with the newest records first). Defaults to true. @@ -653,30 +637,46 @@ async def get_audio( Returns ------- - AsyncHttpResponse[ReturnChatGroupPagedAudioReconstructions] + AsyncPager[ReturnChatEvent] Success """ + page_number = page_number if page_number is not None else 0 + _response = await self._client_wrapper.httpx_client.request( - f"v0/evi/chat_groups/{jsonable_encoder(id)}/audio", + f"v0/evi/chat_groups/{jsonable_encoder(id)}/events", base_url=self._client_wrapper.get_environment().base, method="GET", params={ - "page_number": page_number, "page_size": page_size, + "page_number": page_number, "ascending_order": ascending_order, }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: - _data = typing.cast( - ReturnChatGroupPagedAudioReconstructions, + _parsed_response = typing.cast( + ReturnChatGroupPagedEvents, parse_obj_as( - type_=ReturnChatGroupPagedAudioReconstructions, # type: ignore + type_=ReturnChatGroupPagedEvents, # type: ignore object_=_response.json(), ), ) - return AsyncHttpResponse(response=_response, data=_data) + _items = _parsed_response.events_page + _has_next = True + + async def _get_next(): + return await self.list_chat_group_events( + id, + page_size=page_size, + page_number=page_number + 1, + ascending_order=ascending_order, + request_options=request_options, + ) + + return AsyncPager( + has_next=_has_next, items=_items, get_next=_get_next, response=BaseHttpResponse(response=_response) + ) if _response.status_code == 400: raise BadRequestError( headers=dict(_response.headers), diff --git a/src/hume/empathic_voice/configs/client.py b/src/hume/empathic_voice/configs/client.py index ee4d835f..c7ec1031 100644 --- a/src/hume/empathic_voice/configs/client.py +++ b/src/hume/empathic_voice/configs/client.py @@ -107,16 +107,16 @@ def create_config( *, evi_version: str, name: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReturnConfig: @@ -133,36 +133,36 @@ def create_config( name : str Name applied to all versions of a particular Config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config. + nudges : typing.Optional[PostedNudgeSpec] + Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - nudges : typing.Optional[PostedNudgeSpec] - Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. + version_description : typing.Optional[str] + An optional description of the Config version. - timeouts : typing.Optional[PostedTimeoutSpecs] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -224,16 +224,16 @@ def create_config( _response = self._raw_client.create_config( evi_version=evi_version, name=name, - version_description=version_description, - prompt=prompt, - voice=voice, - language_model=language_model, - ellm_model=ellm_model, - tools=tools, builtin_tools=builtin_tools, + ellm_model=ellm_model, event_messages=event_messages, + language_model=language_model, nudges=nudges, + prompt=prompt, timeouts=timeouts, + tools=tools, + version_description=version_description, + voice=voice, webhooks=webhooks, request_options=request_options, ) @@ -308,16 +308,16 @@ def create_config_version( id: str, *, evi_version: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, - timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, + timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReturnConfig: @@ -334,35 +334,35 @@ def create_config_version( evi_version : str The version of the EVI used with this config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config version. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config version. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config version. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config version. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config version. + nudges : typing.Optional[PostedNudgeSpec] - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config version. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config version. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - timeouts : typing.Optional[PostedTimeoutSpecs] + version_description : typing.Optional[str] + An optional description of the Config version. - nudges : typing.Optional[PostedNudgeSpec] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config version. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -429,16 +429,16 @@ def create_config_version( _response = self._raw_client.create_config_version( id, evi_version=evi_version, - version_description=version_description, - prompt=prompt, - voice=voice, - language_model=language_model, - ellm_model=ellm_model, - tools=tools, builtin_tools=builtin_tools, + ellm_model=ellm_model, event_messages=event_messages, - timeouts=timeouts, + language_model=language_model, nudges=nudges, + prompt=prompt, + timeouts=timeouts, + tools=tools, + version_description=version_description, + voice=voice, webhooks=webhooks, request_options=request_options, ) @@ -747,16 +747,16 @@ async def create_config( *, evi_version: str, name: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReturnConfig: @@ -773,36 +773,36 @@ async def create_config( name : str Name applied to all versions of a particular Config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config. + nudges : typing.Optional[PostedNudgeSpec] + Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - nudges : typing.Optional[PostedNudgeSpec] - Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. + version_description : typing.Optional[str] + An optional description of the Config version. - timeouts : typing.Optional[PostedTimeoutSpecs] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -872,16 +872,16 @@ async def main() -> None: _response = await self._raw_client.create_config( evi_version=evi_version, name=name, - version_description=version_description, - prompt=prompt, - voice=voice, - language_model=language_model, - ellm_model=ellm_model, - tools=tools, builtin_tools=builtin_tools, + ellm_model=ellm_model, event_messages=event_messages, + language_model=language_model, nudges=nudges, + prompt=prompt, timeouts=timeouts, + tools=tools, + version_description=version_description, + voice=voice, webhooks=webhooks, request_options=request_options, ) @@ -965,16 +965,16 @@ async def create_config_version( id: str, *, evi_version: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, - timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, + timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> ReturnConfig: @@ -991,35 +991,35 @@ async def create_config_version( evi_version : str The version of the EVI used with this config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config version. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config version. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config version. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config version. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config version. + nudges : typing.Optional[PostedNudgeSpec] - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config version. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config version. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - timeouts : typing.Optional[PostedTimeoutSpecs] + version_description : typing.Optional[str] + An optional description of the Config version. - nudges : typing.Optional[PostedNudgeSpec] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config version. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -1094,16 +1094,16 @@ async def main() -> None: _response = await self._raw_client.create_config_version( id, evi_version=evi_version, - version_description=version_description, - prompt=prompt, - voice=voice, - language_model=language_model, - ellm_model=ellm_model, - tools=tools, builtin_tools=builtin_tools, + ellm_model=ellm_model, event_messages=event_messages, - timeouts=timeouts, + language_model=language_model, nudges=nudges, + prompt=prompt, + timeouts=timeouts, + tools=tools, + version_description=version_description, + voice=voice, webhooks=webhooks, request_options=request_options, ) diff --git a/src/hume/empathic_voice/configs/raw_client.py b/src/hume/empathic_voice/configs/raw_client.py index 8cb9f597..bcd07c1a 100644 --- a/src/hume/empathic_voice/configs/raw_client.py +++ b/src/hume/empathic_voice/configs/raw_client.py @@ -130,16 +130,16 @@ def create_config( *, evi_version: str, name: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReturnConfig]: @@ -156,36 +156,36 @@ def create_config( name : str Name applied to all versions of a particular Config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config. + nudges : typing.Optional[PostedNudgeSpec] + Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - nudges : typing.Optional[PostedNudgeSpec] - Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. + version_description : typing.Optional[str] + An optional description of the Config version. - timeouts : typing.Optional[PostedTimeoutSpecs] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -203,38 +203,38 @@ def create_config( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "evi_version": evi_version, - "name": name, - "version_description": version_description, - "prompt": convert_and_respect_annotation_metadata( - object_=prompt, annotation=PostedConfigPromptSpec, direction="write" - ), - "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), - "language_model": convert_and_respect_annotation_metadata( - object_=language_model, annotation=PostedLanguageModel, direction="write" - ), - "ellm_model": convert_and_respect_annotation_metadata( - object_=ellm_model, annotation=PostedEllmModel, direction="write" - ), - "tools": convert_and_respect_annotation_metadata( - object_=tools, - annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], - direction="write", - ), "builtin_tools": convert_and_respect_annotation_metadata( object_=builtin_tools, annotation=typing.Sequence[typing.Optional[PostedBuiltinTool]], direction="write", ), + "ellm_model": convert_and_respect_annotation_metadata( + object_=ellm_model, annotation=PostedEllmModel, direction="write" + ), "event_messages": convert_and_respect_annotation_metadata( object_=event_messages, annotation=PostedEventMessageSpecs, direction="write" ), + "evi_version": evi_version, + "language_model": convert_and_respect_annotation_metadata( + object_=language_model, annotation=PostedLanguageModel, direction="write" + ), + "name": name, "nudges": convert_and_respect_annotation_metadata( object_=nudges, annotation=PostedNudgeSpec, direction="write" ), + "prompt": convert_and_respect_annotation_metadata( + object_=prompt, annotation=PostedConfigPromptSpec, direction="write" + ), "timeouts": convert_and_respect_annotation_metadata( object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" ), + "tools": convert_and_respect_annotation_metadata( + object_=tools, + annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], + direction="write", + ), + "version_description": version_description, + "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), "webhooks": convert_and_respect_annotation_metadata( object_=webhooks, annotation=typing.Sequence[typing.Optional[PostedWebhookSpec]], direction="write" ), @@ -366,16 +366,16 @@ def create_config_version( id: str, *, evi_version: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, - timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, + timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ReturnConfig]: @@ -392,35 +392,35 @@ def create_config_version( evi_version : str The version of the EVI used with this config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config version. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config version. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config version. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config version. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config version. + nudges : typing.Optional[PostedNudgeSpec] - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config version. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config version. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - timeouts : typing.Optional[PostedTimeoutSpecs] + version_description : typing.Optional[str] + An optional description of the Config version. - nudges : typing.Optional[PostedNudgeSpec] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config version. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -438,37 +438,37 @@ def create_config_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "evi_version": evi_version, - "version_description": version_description, - "prompt": convert_and_respect_annotation_metadata( - object_=prompt, annotation=PostedConfigPromptSpec, direction="write" - ), - "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), - "language_model": convert_and_respect_annotation_metadata( - object_=language_model, annotation=PostedLanguageModel, direction="write" - ), - "ellm_model": convert_and_respect_annotation_metadata( - object_=ellm_model, annotation=PostedEllmModel, direction="write" - ), - "tools": convert_and_respect_annotation_metadata( - object_=tools, - annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], - direction="write", - ), "builtin_tools": convert_and_respect_annotation_metadata( object_=builtin_tools, annotation=typing.Sequence[typing.Optional[PostedBuiltinTool]], direction="write", ), + "ellm_model": convert_and_respect_annotation_metadata( + object_=ellm_model, annotation=PostedEllmModel, direction="write" + ), "event_messages": convert_and_respect_annotation_metadata( object_=event_messages, annotation=PostedEventMessageSpecs, direction="write" ), - "timeouts": convert_and_respect_annotation_metadata( - object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" + "evi_version": evi_version, + "language_model": convert_and_respect_annotation_metadata( + object_=language_model, annotation=PostedLanguageModel, direction="write" ), "nudges": convert_and_respect_annotation_metadata( object_=nudges, annotation=PostedNudgeSpec, direction="write" ), + "prompt": convert_and_respect_annotation_metadata( + object_=prompt, annotation=PostedConfigPromptSpec, direction="write" + ), + "timeouts": convert_and_respect_annotation_metadata( + object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" + ), + "tools": convert_and_respect_annotation_metadata( + object_=tools, + annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], + direction="write", + ), + "version_description": version_description, + "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), "webhooks": convert_and_respect_annotation_metadata( object_=webhooks, annotation=typing.Sequence[typing.Optional[PostedWebhookSpec]], direction="write" ), @@ -895,16 +895,16 @@ async def create_config( *, evi_version: str, name: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReturnConfig]: @@ -921,36 +921,36 @@ async def create_config( name : str Name applied to all versions of a particular Config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config. + nudges : typing.Optional[PostedNudgeSpec] + Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - nudges : typing.Optional[PostedNudgeSpec] - Configures nudges, brief audio prompts that can guide conversations when users pause or need encouragement to continue speaking. Nudges help create more natural, flowing interactions by providing gentle conversational cues. + version_description : typing.Optional[str] + An optional description of the Config version. - timeouts : typing.Optional[PostedTimeoutSpecs] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -968,38 +968,38 @@ async def create_config( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "evi_version": evi_version, - "name": name, - "version_description": version_description, - "prompt": convert_and_respect_annotation_metadata( - object_=prompt, annotation=PostedConfigPromptSpec, direction="write" - ), - "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), - "language_model": convert_and_respect_annotation_metadata( - object_=language_model, annotation=PostedLanguageModel, direction="write" - ), - "ellm_model": convert_and_respect_annotation_metadata( - object_=ellm_model, annotation=PostedEllmModel, direction="write" - ), - "tools": convert_and_respect_annotation_metadata( - object_=tools, - annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], - direction="write", - ), "builtin_tools": convert_and_respect_annotation_metadata( object_=builtin_tools, annotation=typing.Sequence[typing.Optional[PostedBuiltinTool]], direction="write", ), + "ellm_model": convert_and_respect_annotation_metadata( + object_=ellm_model, annotation=PostedEllmModel, direction="write" + ), "event_messages": convert_and_respect_annotation_metadata( object_=event_messages, annotation=PostedEventMessageSpecs, direction="write" ), + "evi_version": evi_version, + "language_model": convert_and_respect_annotation_metadata( + object_=language_model, annotation=PostedLanguageModel, direction="write" + ), + "name": name, "nudges": convert_and_respect_annotation_metadata( object_=nudges, annotation=PostedNudgeSpec, direction="write" ), + "prompt": convert_and_respect_annotation_metadata( + object_=prompt, annotation=PostedConfigPromptSpec, direction="write" + ), "timeouts": convert_and_respect_annotation_metadata( object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" ), + "tools": convert_and_respect_annotation_metadata( + object_=tools, + annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], + direction="write", + ), + "version_description": version_description, + "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), "webhooks": convert_and_respect_annotation_metadata( object_=webhooks, annotation=typing.Sequence[typing.Optional[PostedWebhookSpec]], direction="write" ), @@ -1134,16 +1134,16 @@ async def create_config_version( id: str, *, evi_version: str, - version_description: typing.Optional[str] = OMIT, - prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, - voice: typing.Optional[VoiceRef] = OMIT, - language_model: typing.Optional[PostedLanguageModel] = OMIT, - ellm_model: typing.Optional[PostedEllmModel] = OMIT, - tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, builtin_tools: typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] = OMIT, + ellm_model: typing.Optional[PostedEllmModel] = OMIT, event_messages: typing.Optional[PostedEventMessageSpecs] = OMIT, - timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + language_model: typing.Optional[PostedLanguageModel] = OMIT, nudges: typing.Optional[PostedNudgeSpec] = OMIT, + prompt: typing.Optional[PostedConfigPromptSpec] = OMIT, + timeouts: typing.Optional[PostedTimeoutSpecs] = OMIT, + tools: typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] = OMIT, + version_description: typing.Optional[str] = OMIT, + voice: typing.Optional[VoiceRef] = OMIT, webhooks: typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ReturnConfig]: @@ -1160,35 +1160,35 @@ async def create_config_version( evi_version : str The version of the EVI used with this config. - version_description : typing.Optional[str] - An optional description of the Config version. + builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] + List of built-in tools associated with this Config version. - prompt : typing.Optional[PostedConfigPromptSpec] + ellm_model : typing.Optional[PostedEllmModel] + The eLLM setup associated with this Config version. - voice : typing.Optional[VoiceRef] - A voice specification associated with this Config version. + Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + + event_messages : typing.Optional[PostedEventMessageSpecs] language_model : typing.Optional[PostedLanguageModel] The supplemental language model associated with this Config version. This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. - ellm_model : typing.Optional[PostedEllmModel] - The eLLM setup associated with this Config version. + nudges : typing.Optional[PostedNudgeSpec] - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. + prompt : typing.Optional[PostedConfigPromptSpec] + + timeouts : typing.Optional[PostedTimeoutSpecs] tools : typing.Optional[typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]]] List of user-defined tools associated with this Config version. - builtin_tools : typing.Optional[typing.Sequence[typing.Optional[PostedBuiltinTool]]] - List of built-in tools associated with this Config version. - - event_messages : typing.Optional[PostedEventMessageSpecs] - - timeouts : typing.Optional[PostedTimeoutSpecs] + version_description : typing.Optional[str] + An optional description of the Config version. - nudges : typing.Optional[PostedNudgeSpec] + voice : typing.Optional[VoiceRef] + A voice specification associated with this Config version. webhooks : typing.Optional[typing.Sequence[typing.Optional[PostedWebhookSpec]]] Webhook config specifications for each subscriber. @@ -1206,37 +1206,37 @@ async def create_config_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "evi_version": evi_version, - "version_description": version_description, - "prompt": convert_and_respect_annotation_metadata( - object_=prompt, annotation=PostedConfigPromptSpec, direction="write" - ), - "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), - "language_model": convert_and_respect_annotation_metadata( - object_=language_model, annotation=PostedLanguageModel, direction="write" - ), - "ellm_model": convert_and_respect_annotation_metadata( - object_=ellm_model, annotation=PostedEllmModel, direction="write" - ), - "tools": convert_and_respect_annotation_metadata( - object_=tools, - annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], - direction="write", - ), "builtin_tools": convert_and_respect_annotation_metadata( object_=builtin_tools, annotation=typing.Sequence[typing.Optional[PostedBuiltinTool]], direction="write", ), + "ellm_model": convert_and_respect_annotation_metadata( + object_=ellm_model, annotation=PostedEllmModel, direction="write" + ), "event_messages": convert_and_respect_annotation_metadata( object_=event_messages, annotation=PostedEventMessageSpecs, direction="write" ), - "timeouts": convert_and_respect_annotation_metadata( - object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" + "evi_version": evi_version, + "language_model": convert_and_respect_annotation_metadata( + object_=language_model, annotation=PostedLanguageModel, direction="write" ), "nudges": convert_and_respect_annotation_metadata( object_=nudges, annotation=PostedNudgeSpec, direction="write" ), + "prompt": convert_and_respect_annotation_metadata( + object_=prompt, annotation=PostedConfigPromptSpec, direction="write" + ), + "timeouts": convert_and_respect_annotation_metadata( + object_=timeouts, annotation=PostedTimeoutSpecs, direction="write" + ), + "tools": convert_and_respect_annotation_metadata( + object_=tools, + annotation=typing.Sequence[typing.Optional[PostedUserDefinedToolSpec]], + direction="write", + ), + "version_description": version_description, + "voice": convert_and_respect_annotation_metadata(object_=voice, annotation=VoiceRef, direction="write"), "webhooks": convert_and_respect_annotation_metadata( object_=webhooks, annotation=typing.Sequence[typing.Optional[PostedWebhookSpec]], direction="write" ), diff --git a/src/hume/empathic_voice/prompts/raw_client.py b/src/hume/empathic_voice/prompts/raw_client.py index 4f3b46b0..dbba6271 100644 --- a/src/hume/empathic_voice/prompts/raw_client.py +++ b/src/hume/empathic_voice/prompts/raw_client.py @@ -156,8 +156,8 @@ def create_prompt( method="POST", json={ "name": name, - "version_description": version_description, "text": text, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -311,8 +311,8 @@ def create_prompt_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "version_description": version_description, "text": text, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -779,8 +779,8 @@ async def create_prompt( method="POST", json={ "name": name, - "version_description": version_description, "text": text, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -934,8 +934,8 @@ async def create_prompt_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "version_description": version_description, "text": text, + "version_description": version_description, }, headers={ "content-type": "application/json", diff --git a/src/hume/empathic_voice/tools/client.py b/src/hume/empathic_voice/tools/client.py index a4fa44fc..2305669f 100644 --- a/src/hume/empathic_voice/tools/client.py +++ b/src/hume/empathic_voice/tools/client.py @@ -97,9 +97,9 @@ def create_tool( *, name: str, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[ReturnUserDefinedTool]: """ @@ -117,15 +117,15 @@ def create_tool( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -152,9 +152,9 @@ def create_tool( _response = self._raw_client.create_tool( name=name, parameters=parameters, - version_description=version_description, description=description, fallback_content=fallback_content, + version_description=version_description, request_options=request_options, ) return _response.data @@ -228,9 +228,9 @@ def create_tool_version( id: str, *, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[ReturnUserDefinedTool]: """ @@ -248,15 +248,15 @@ def create_tool_version( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -283,9 +283,9 @@ def create_tool_version( _response = self._raw_client.create_tool_version( id, parameters=parameters, - version_description=version_description, description=description, fallback_content=fallback_content, + version_description=version_description, request_options=request_options, ) return _response.data @@ -593,9 +593,9 @@ async def create_tool( *, name: str, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[ReturnUserDefinedTool]: """ @@ -613,15 +613,15 @@ async def create_tool( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -656,9 +656,9 @@ async def main() -> None: _response = await self._raw_client.create_tool( name=name, parameters=parameters, - version_description=version_description, description=description, fallback_content=fallback_content, + version_description=version_description, request_options=request_options, ) return _response.data @@ -741,9 +741,9 @@ async def create_tool_version( id: str, *, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> typing.Optional[ReturnUserDefinedTool]: """ @@ -761,15 +761,15 @@ async def create_tool_version( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -804,9 +804,9 @@ async def main() -> None: _response = await self._raw_client.create_tool_version( id, parameters=parameters, - version_description=version_description, description=description, fallback_content=fallback_content, + version_description=version_description, request_options=request_options, ) return _response.data diff --git a/src/hume/empathic_voice/tools/raw_client.py b/src/hume/empathic_voice/tools/raw_client.py index e46a6898..227a07d6 100644 --- a/src/hume/empathic_voice/tools/raw_client.py +++ b/src/hume/empathic_voice/tools/raw_client.py @@ -119,9 +119,9 @@ def create_tool( *, name: str, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.Optional[ReturnUserDefinedTool]]: """ @@ -139,15 +139,15 @@ def create_tool( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -161,11 +161,11 @@ def create_tool( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "name": name, - "version_description": version_description, "description": description, - "parameters": parameters, "fallback_content": fallback_content, + "name": name, + "parameters": parameters, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -296,9 +296,9 @@ def create_tool_version( id: str, *, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[typing.Optional[ReturnUserDefinedTool]]: """ @@ -316,15 +316,15 @@ def create_tool_version( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -338,10 +338,10 @@ def create_tool_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "version_description": version_description, "description": description, - "parameters": parameters, "fallback_content": fallback_content, + "parameters": parameters, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -771,9 +771,9 @@ async def create_tool( *, name: str, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.Optional[ReturnUserDefinedTool]]: """ @@ -791,15 +791,15 @@ async def create_tool( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -813,11 +813,11 @@ async def create_tool( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "name": name, - "version_description": version_description, "description": description, - "parameters": parameters, "fallback_content": fallback_content, + "name": name, + "parameters": parameters, + "version_description": version_description, }, headers={ "content-type": "application/json", @@ -951,9 +951,9 @@ async def create_tool_version( id: str, *, parameters: str, - version_description: typing.Optional[str] = OMIT, description: typing.Optional[str] = OMIT, fallback_content: typing.Optional[str] = OMIT, + version_description: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[typing.Optional[ReturnUserDefinedTool]]: """ @@ -971,15 +971,15 @@ async def create_tool_version( These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the Tool receives data in the expected format. - version_description : typing.Optional[str] - An optional description of the Tool version. - description : typing.Optional[str] An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. fallback_content : typing.Optional[str] Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + version_description : typing.Optional[str] + An optional description of the Tool version. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -993,10 +993,10 @@ async def create_tool_version( base_url=self._client_wrapper.get_environment().base, method="POST", json={ - "version_description": version_description, "description": description, - "parameters": parameters, "fallback_content": fallback_content, + "parameters": parameters, + "version_description": version_description, }, headers={ "content-type": "application/json", diff --git a/src/hume/empathic_voice/types/error_response.py b/src/hume/empathic_voice/types/error_response.py index f99f009f..33b3f718 100644 --- a/src/hume/empathic_voice/types/error_response.py +++ b/src/hume/empathic_voice/types/error_response.py @@ -7,9 +7,9 @@ class ErrorResponse(UniversalBaseModel): + code: typing.Optional[str] = None error: typing.Optional[str] = None message: typing.Optional[str] = None - code: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/hume/empathic_voice/types/posted_builtin_tool.py b/src/hume/empathic_voice/types/posted_builtin_tool.py index 3d196dac..3bf2d223 100644 --- a/src/hume/empathic_voice/types/posted_builtin_tool.py +++ b/src/hume/empathic_voice/types/posted_builtin_tool.py @@ -12,6 +12,11 @@ class PostedBuiltinTool(UniversalBaseModel): A configuration of a built-in tool to be posted to the server """ + fallback_content: typing.Optional[str] = pydantic.Field(default=None) + """ + Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + """ + name: PostedBuiltinToolName = pydantic.Field() """ Name of the built-in tool to use. Hume supports the following built-in tools: @@ -22,11 +27,6 @@ class PostedBuiltinTool(UniversalBaseModel): For more information, see our guide on [using built-in tools](/docs/speech-to-speech-evi/features/tool-use#using-built-in-tools). """ - fallback_content: typing.Optional[str] = pydantic.Field(default=None) - """ - Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/posted_config_prompt_spec.py b/src/hume/empathic_voice/types/posted_config_prompt_spec.py index e7485321..81eb66f9 100644 --- a/src/hume/empathic_voice/types/posted_config_prompt_spec.py +++ b/src/hume/empathic_voice/types/posted_config_prompt_spec.py @@ -16,14 +16,14 @@ class PostedConfigPromptSpec(UniversalBaseModel): Identifier for a Prompt. Formatted as a UUID. """ - version: typing.Optional[int] = pydantic.Field(default=None) + text: typing.Optional[str] = pydantic.Field(default=None) """ - Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. + Text used to create a new prompt for a particular config. """ - text: typing.Optional[str] = pydantic.Field(default=None) + version: typing.Optional[int] = pydantic.Field(default=None) """ - Text used to create a new prompt for a particular config. + Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/posted_event_message_specs.py b/src/hume/empathic_voice/types/posted_event_message_specs.py index b6037069..fe78ced7 100644 --- a/src/hume/empathic_voice/types/posted_event_message_specs.py +++ b/src/hume/empathic_voice/types/posted_event_message_specs.py @@ -14,11 +14,6 @@ class PostedEventMessageSpecs(UniversalBaseModel): Event messages are sent by the server when specific events occur during a chat session. These messages are used to configure behaviors for EVI, such as controlling how EVI starts a new conversation. """ - on_new_chat: typing.Optional[PostedEventMessageSpec] = pydantic.Field(default=None) - """ - Specifies the initial message EVI provides when a new chat is started, such as a greeting or welcome message. - """ - on_inactivity_timeout: typing.Optional[PostedEventMessageSpec] = pydantic.Field(default=None) """ Specifies the message EVI provides when the chat is about to be disconnected due to a user inactivity timeout, such as a message mentioning a lack of user input for a period of time. @@ -35,6 +30,11 @@ class PostedEventMessageSpecs(UniversalBaseModel): Specifies the message EVI provides when the chat is disconnected due to reaching the maximum chat duration, such as a message mentioning the time limit for the chat has been reached. """ + on_new_chat: typing.Optional[PostedEventMessageSpec] = pydantic.Field(default=None) + """ + Specifies the initial message EVI provides when a new chat is started, such as a greeting or welcome message. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/posted_timeout_spec.py b/src/hume/empathic_voice/types/posted_timeout_spec.py index 2b8b3fe5..2e6a8bb4 100644 --- a/src/hume/empathic_voice/types/posted_timeout_spec.py +++ b/src/hume/empathic_voice/types/posted_timeout_spec.py @@ -11,14 +11,14 @@ class PostedTimeoutSpec(UniversalBaseModel): Settings for a specific timeout to be posted to the server """ - enabled: bool = pydantic.Field() + duration_secs: typing.Optional[int] = pydantic.Field(default=None) """ - Boolean indicating if this event message is enabled. + Duration in seconds for the timeout. """ - duration_secs: typing.Optional[int] = pydantic.Field(default=None) + enabled: bool = pydantic.Field() """ - Duration in seconds for the timeout. + Boolean indicating if this event message is enabled. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/posted_webhook_event_type.py b/src/hume/empathic_voice/types/posted_webhook_event_type.py index 6eaee0de..bafa0bb2 100644 --- a/src/hume/empathic_voice/types/posted_webhook_event_type.py +++ b/src/hume/empathic_voice/types/posted_webhook_event_type.py @@ -2,4 +2,4 @@ import typing -PostedWebhookEventType = typing.Union[typing.Literal["chat_started", "chat_ended"], typing.Any] +PostedWebhookEventType = typing.Union[typing.Literal["chat_started", "chat_ended", "tool_call"], typing.Any] diff --git a/src/hume/empathic_voice/types/posted_webhook_spec.py b/src/hume/empathic_voice/types/posted_webhook_spec.py index 0d3b13db..a8cf973b 100644 --- a/src/hume/empathic_voice/types/posted_webhook_spec.py +++ b/src/hume/empathic_voice/types/posted_webhook_spec.py @@ -12,11 +12,6 @@ class PostedWebhookSpec(UniversalBaseModel): URL and settings for a specific webhook to be posted to the server """ - url: str = pydantic.Field() - """ - The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. - """ - events: typing.List[PostedWebhookEventType] = pydantic.Field() """ The list of events the specified URL is subscribed to. @@ -24,6 +19,11 @@ class PostedWebhookSpec(UniversalBaseModel): See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. """ + url: str = pydantic.Field() + """ + The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_builtin_tool.py b/src/hume/empathic_voice/types/return_builtin_tool.py index 7ad5c0ba..7261efd5 100644 --- a/src/hume/empathic_voice/types/return_builtin_tool.py +++ b/src/hume/empathic_voice/types/return_builtin_tool.py @@ -12,9 +12,9 @@ class ReturnBuiltinTool(UniversalBaseModel): A specific builtin tool version returned from the server """ - tool_type: ReturnBuiltinToolToolType = pydantic.Field() + fallback_content: typing.Optional[str] = pydantic.Field(default=None) """ - Type of Tool. Either `BUILTIN` for natively implemented tools, like web search, or `FUNCTION` for user-defined tools. + Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. """ name: str = pydantic.Field() @@ -22,9 +22,9 @@ class ReturnBuiltinTool(UniversalBaseModel): Name applied to all versions of a particular Tool. """ - fallback_content: typing.Optional[str] = pydantic.Field(default=None) + tool_type: ReturnBuiltinToolToolType = pydantic.Field() """ - Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + Type of Tool. Either `BUILTIN` for natively implemented tools, like web search, or `FUNCTION` for user-defined tools. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat.py b/src/hume/empathic_voice/types/return_chat.py index 6c696a32..b2af9bf4 100644 --- a/src/hume/empathic_voice/types/return_chat.py +++ b/src/hume/empathic_voice/types/return_chat.py @@ -13,14 +13,35 @@ class ReturnChat(UniversalBaseModel): A description of chat and its status """ + chat_group_id: str = pydantic.Field() + """ + Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. + """ + + config: typing.Optional[ReturnConfigSpec] = None + end_timestamp: typing.Optional[int] = pydantic.Field(default=None) + """ + Time at which the Chat ended. Measured in seconds since the Unix epoch. + """ + + event_count: typing.Optional[int] = pydantic.Field(default=None) + """ + The total number of events currently in this chat. + """ + id: str = pydantic.Field() """ Identifier for a Chat. Formatted as a UUID. """ - chat_group_id: str = pydantic.Field() + metadata: typing.Optional[str] = pydantic.Field(default=None) """ - Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. + Stringified JSON with additional metadata about the chat. + """ + + start_timestamp: int = pydantic.Field() + """ + Time at which the Chat started. Measured in seconds since the Unix epoch. """ status: ReturnChatStatus = pydantic.Field() @@ -40,28 +61,6 @@ class ReturnChat(UniversalBaseModel): - `ERROR`: The chat ended unexpectedly due to an error. """ - start_timestamp: int = pydantic.Field() - """ - Time at which the Chat started. Measured in seconds since the Unix epoch. - """ - - end_timestamp: typing.Optional[int] = pydantic.Field(default=None) - """ - Time at which the Chat ended. Measured in seconds since the Unix epoch. - """ - - event_count: typing.Optional[int] = pydantic.Field(default=None) - """ - The total number of events currently in this chat. - """ - - metadata: typing.Optional[str] = pydantic.Field(default=None) - """ - Stringified JSON with additional metadata about the chat. - """ - - config: typing.Optional[ReturnConfigSpec] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_chat_audio_reconstruction.py b/src/hume/empathic_voice/types/return_chat_audio_reconstruction.py index ac32656c..60bab1ff 100644 --- a/src/hume/empathic_voice/types/return_chat_audio_reconstruction.py +++ b/src/hume/empathic_voice/types/return_chat_audio_reconstruction.py @@ -12,14 +12,29 @@ class ReturnChatAudioReconstruction(UniversalBaseModel): List of chat audio reconstructions returned for the specified page number and page size. """ + filename: typing.Optional[str] = pydantic.Field(default=None) + """ + Name of the chat audio reconstruction file. + """ + id: str = pydantic.Field() """ Identifier for the chat. Formatted as a UUID. """ - user_id: str = pydantic.Field() + modified_at: typing.Optional[int] = pydantic.Field(default=None) """ - Identifier for the user that owns this chat. Formatted as a UUID. + The timestamp of the most recent status change for this audio reconstruction, formatted milliseconds since the Unix epoch. + """ + + signed_audio_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Signed URL used to download the chat audio reconstruction file. + """ + + signed_url_expiration_timestamp_millis: typing.Optional[int] = pydantic.Field(default=None) + """ + The timestamp when the signed URL will expire, formatted as a Unix epoch milliseconds. """ status: ReturnChatAudioReconstructionStatus = pydantic.Field() @@ -37,24 +52,9 @@ class ReturnChatAudioReconstruction(UniversalBaseModel): - `CANCELED`: The reconstruction job has been canceled. """ - filename: typing.Optional[str] = pydantic.Field(default=None) - """ - Name of the chat audio reconstruction file. - """ - - modified_at: typing.Optional[int] = pydantic.Field(default=None) - """ - The timestamp of the most recent status change for this audio reconstruction, formatted milliseconds since the Unix epoch. - """ - - signed_audio_url: typing.Optional[str] = pydantic.Field(default=None) - """ - Signed URL used to download the chat audio reconstruction file. - """ - - signed_url_expiration_timestamp_millis: typing.Optional[int] = pydantic.Field(default=None) + user_id: str = pydantic.Field() """ - The timestamp when the signed URL will expire, formatted as a Unix epoch milliseconds. + Identifier for the user that owns this chat. Formatted as a UUID. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat_event.py b/src/hume/empathic_voice/types/return_chat_event.py index 8f60988f..43cdbc76 100644 --- a/src/hume/empathic_voice/types/return_chat_event.py +++ b/src/hume/empathic_voice/types/return_chat_event.py @@ -13,19 +13,36 @@ class ReturnChatEvent(UniversalBaseModel): A description of a single event in a chat returned from the server """ + chat_id: str = pydantic.Field() + """ + Identifier for the Chat this event occurred in. Formatted as a UUID. + """ + + emotion_features: typing.Optional[str] = pydantic.Field(default=None) + """ + Stringified JSON containing the prosody model inference results. + + EVI uses the prosody model to measure 48 expressions related to speech and vocal characteristics. These results contain a detailed emotional and tonal analysis of the audio. Scores typically range from 0 to 1, with higher values indicating a stronger confidence level in the measured attribute. + """ + id: str = pydantic.Field() """ Identifier for a Chat Event. Formatted as a UUID. """ - chat_id: str = pydantic.Field() + message_text: typing.Optional[str] = pydantic.Field(default=None) """ - Identifier for the Chat this event occurred in. Formatted as a UUID. + The text of the Chat Event. This field contains the message content for each event type listed in the `type` field. """ - timestamp: int = pydantic.Field() + metadata: typing.Optional[str] = pydantic.Field(default=None) """ - Time at which the Chat Event occurred. Measured in seconds since the Unix epoch. + Stringified JSON with additional metadata about the chat event. + """ + + related_event_id: typing.Optional[str] = pydantic.Field(default=None) + """ + Identifier for a related chat event. Currently only seen on ASSISTANT_PROSODY events, to point back to the ASSISTANT_MESSAGE that generated these prosody scores """ role: ReturnChatEventRole = pydantic.Field() @@ -37,6 +54,11 @@ class ReturnChatEvent(UniversalBaseModel): - `TOOL`: The function calling mechanism. """ + timestamp: int = pydantic.Field() + """ + Time at which the Chat Event occurred. Measured in seconds since the Unix epoch. + """ + type: ReturnChatEventType = pydantic.Field() """ Type of Chat Event. There are eleven Chat Event types: @@ -53,28 +75,6 @@ class ReturnChatEvent(UniversalBaseModel): - `CHAT_END_MESSAGE`: Indicates the end of the chat session. """ - message_text: typing.Optional[str] = pydantic.Field(default=None) - """ - The text of the Chat Event. This field contains the message content for each event type listed in the `type` field. - """ - - emotion_features: typing.Optional[str] = pydantic.Field(default=None) - """ - Stringified JSON containing the prosody model inference results. - - EVI uses the prosody model to measure 48 expressions related to speech and vocal characteristics. These results contain a detailed emotional and tonal analysis of the audio. Scores typically range from 0 to 1, with higher values indicating a stronger confidence level in the measured attribute. - """ - - metadata: typing.Optional[str] = pydantic.Field(default=None) - """ - Stringified JSON with additional metadata about the chat event. - """ - - related_event_id: typing.Optional[str] = pydantic.Field(default=None) - """ - Identifier for a related chat event. Currently only seen on ASSISTANT_PROSODY events, to point back to the ASSISTANT_MESSAGE that generated these prosody scores - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_chat_group.py b/src/hume/empathic_voice/types/return_chat_group.py index d1438919..88df5b1d 100644 --- a/src/hume/empathic_voice/types/return_chat_group.py +++ b/src/hume/empathic_voice/types/return_chat_group.py @@ -12,9 +12,9 @@ class ReturnChatGroup(UniversalBaseModel): A description of chat_group and its status """ - id: str = pydantic.Field() + active: typing.Optional[bool] = pydantic.Field(default=None) """ - Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. + Denotes whether there is an active Chat associated with this Chat Group. """ first_start_timestamp: int = pydantic.Field() @@ -22,9 +22,9 @@ class ReturnChatGroup(UniversalBaseModel): Time at which the first Chat in this Chat Group was created. Measured in seconds since the Unix epoch. """ - most_recent_start_timestamp: int = pydantic.Field() + id: str = pydantic.Field() """ - Time at which the most recent Chat in this Chat Group was created. Measured in seconds since the Unix epoch. + Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. """ most_recent_chat_id: typing.Optional[str] = pydantic.Field(default=None) @@ -33,14 +33,14 @@ class ReturnChatGroup(UniversalBaseModel): """ most_recent_config: typing.Optional[ReturnConfigSpec] = None - num_chats: int = pydantic.Field() + most_recent_start_timestamp: int = pydantic.Field() """ - The total number of Chats in this Chat Group. + Time at which the most recent Chat in this Chat Group was created. Measured in seconds since the Unix epoch. """ - active: typing.Optional[bool] = pydantic.Field(default=None) + num_chats: int = pydantic.Field() """ - Denotes whether there is an active Chat associated with this Chat Group. + The total number of Chats in this Chat Group. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat_group_paged_audio_reconstructions.py b/src/hume/empathic_voice/types/return_chat_group_paged_audio_reconstructions.py index 24aa6372..5d592368 100644 --- a/src/hume/empathic_voice/types/return_chat_group_paged_audio_reconstructions.py +++ b/src/hume/empathic_voice/types/return_chat_group_paged_audio_reconstructions.py @@ -15,14 +15,14 @@ class ReturnChatGroupPagedAudioReconstructions(UniversalBaseModel): A paginated list of chat reconstructions for a particular chatgroup """ - id: str = pydantic.Field() + audio_reconstructions_page: typing.List[ReturnChatAudioReconstruction] = pydantic.Field() """ - Identifier for the chat group. Formatted as a UUID. + List of chat audio reconstructions returned for the specified page number and page size. """ - user_id: str = pydantic.Field() + id: str = pydantic.Field() """ - Identifier for the user that owns this chat. Formatted as a UUID. + Identifier for the chat group. Formatted as a UUID. """ num_chats: int = pydantic.Field() @@ -44,11 +44,6 @@ class ReturnChatGroupPagedAudioReconstructions(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() - """ - The total number of pages in the collection. - """ - pagination_direction: ReturnChatGroupPagedAudioReconstructionsPaginationDirection = pydantic.Field() """ Indicates the order in which the paginated results are presented, based on their creation date. @@ -56,9 +51,14 @@ class ReturnChatGroupPagedAudioReconstructions(UniversalBaseModel): It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. """ - audio_reconstructions_page: typing.List[ReturnChatAudioReconstruction] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of chat audio reconstructions returned for the specified page number and page size. + The total number of pages in the collection. + """ + + user_id: str = pydantic.Field() + """ + Identifier for the user that owns this chat. Formatted as a UUID. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat_group_paged_chats.py b/src/hume/empathic_voice/types/return_chat_group_paged_chats.py index e2d929ba..8b5cc77a 100644 --- a/src/hume/empathic_voice/types/return_chat_group_paged_chats.py +++ b/src/hume/empathic_voice/types/return_chat_group_paged_chats.py @@ -13,9 +13,14 @@ class ReturnChatGroupPagedChats(UniversalBaseModel): A description of chat_group and its status with a paginated list of each chat in the chat_group """ - id: str = pydantic.Field() + active: typing.Optional[bool] = pydantic.Field(default=None) """ - Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. + Denotes whether there is an active Chat associated with this Chat Group. + """ + + chats_page: typing.List[ReturnChat] = pydantic.Field() + """ + List of Chats for the specified `page_number` and `page_size`. """ first_start_timestamp: int = pydantic.Field() @@ -23,6 +28,11 @@ class ReturnChatGroupPagedChats(UniversalBaseModel): Time at which the first Chat in this Chat Group was created. Measured in seconds since the Unix epoch. """ + id: str = pydantic.Field() + """ + Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. + """ + most_recent_start_timestamp: int = pydantic.Field() """ Time at which the most recent Chat in this Chat Group was created. Measured in seconds since the Unix epoch. @@ -47,11 +57,6 @@ class ReturnChatGroupPagedChats(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() - """ - The total number of pages in the collection. - """ - pagination_direction: ReturnChatGroupPagedChatsPaginationDirection = pydantic.Field() """ Indicates the order in which the paginated results are presented, based on their creation date. @@ -59,14 +64,9 @@ class ReturnChatGroupPagedChats(UniversalBaseModel): It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. """ - chats_page: typing.List[ReturnChat] = pydantic.Field() - """ - List of Chats for the specified `page_number` and `page_size`. - """ - - active: typing.Optional[bool] = pydantic.Field(default=None) + total_pages: int = pydantic.Field() """ - Denotes whether there is an active Chat associated with this Chat Group. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat_group_paged_events.py b/src/hume/empathic_voice/types/return_chat_group_paged_events.py index 28857bfb..0af353d5 100644 --- a/src/hume/empathic_voice/types/return_chat_group_paged_events.py +++ b/src/hume/empathic_voice/types/return_chat_group_paged_events.py @@ -13,6 +13,11 @@ class ReturnChatGroupPagedEvents(UniversalBaseModel): A paginated list of chat events that occurred across chats in this chat_group from the server """ + events_page: typing.List[ReturnChatEvent] = pydantic.Field() + """ + List of Chat Events for the specified `page_number` and `page_size`. + """ + id: str = pydantic.Field() """ Identifier for the Chat Group. Any Chat resumed from this Chat Group will have the same `chat_group_id`. Formatted as a UUID. @@ -32,11 +37,6 @@ class ReturnChatGroupPagedEvents(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() - """ - The total number of pages in the collection. - """ - pagination_direction: ReturnChatGroupPagedEventsPaginationDirection = pydantic.Field() """ Indicates the order in which the paginated results are presented, based on their creation date. @@ -44,9 +44,9 @@ class ReturnChatGroupPagedEvents(UniversalBaseModel): It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. """ - events_page: typing.List[ReturnChatEvent] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of Chat Events for the specified `page_number` and `page_size`. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_chat_paged_events.py b/src/hume/empathic_voice/types/return_chat_paged_events.py index d0ce9107..d8a55b74 100644 --- a/src/hume/empathic_voice/types/return_chat_paged_events.py +++ b/src/hume/empathic_voice/types/return_chat_paged_events.py @@ -15,53 +15,25 @@ class ReturnChatPagedEvents(UniversalBaseModel): A description of chat status with a paginated list of chat events returned from the server """ - id: str = pydantic.Field() - """ - Identifier for a Chat. Formatted as a UUID. - """ - chat_group_id: str = pydantic.Field() """ Identifier for the Chat Group. Any chat resumed from this Chat will have the same `chat_group_id`. Formatted as a UUID. """ - status: ReturnChatPagedEventsStatus = pydantic.Field() - """ - Indicates the current state of the chat. There are six possible statuses: - - - `ACTIVE`: The chat is currently active and ongoing. - - - `USER_ENDED`: The chat was manually ended by the user. - - - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. - - - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the maximum allowed duration. - - - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. - - - `ERROR`: The chat ended unexpectedly due to an error. - """ - - start_timestamp: int = pydantic.Field() - """ - Time at which the Chat started. Measured in seconds since the Unix epoch. - """ - + config: typing.Optional[ReturnConfigSpec] = None end_timestamp: typing.Optional[int] = pydantic.Field(default=None) """ Time at which the Chat ended. Measured in seconds since the Unix epoch. """ - pagination_direction: ReturnChatPagedEventsPaginationDirection = pydantic.Field() + events_page: typing.List[ReturnChatEvent] = pydantic.Field() """ - Indicates the order in which the paginated results are presented, based on their creation date. - - It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. + List of Chat Events for the specified `page_number` and `page_size`. """ - events_page: typing.List[ReturnChatEvent] = pydantic.Field() + id: str = pydantic.Field() """ - List of Chat Events for the specified `page_number` and `page_size`. + Identifier for a Chat. Formatted as a UUID. """ metadata: typing.Optional[str] = pydantic.Field(default=None) @@ -83,13 +55,40 @@ class ReturnChatPagedEvents(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ + pagination_direction: ReturnChatPagedEventsPaginationDirection = pydantic.Field() + """ + Indicates the order in which the paginated results are presented, based on their creation date. + + It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. + """ + + start_timestamp: int = pydantic.Field() + """ + Time at which the Chat started. Measured in seconds since the Unix epoch. + """ + + status: ReturnChatPagedEventsStatus = pydantic.Field() + """ + Indicates the current state of the chat. There are six possible statuses: + + - `ACTIVE`: The chat is currently active and ongoing. + + - `USER_ENDED`: The chat was manually ended by the user. + + - `USER_TIMEOUT`: The chat ended due to a user-defined timeout. + + - `MAX_DURATION_TIMEOUT`: The chat ended because it reached the maximum allowed duration. + + - `INACTIVITY_TIMEOUT`: The chat ended due to an inactivity timeout. + + - `ERROR`: The chat ended unexpectedly due to an error. + """ + total_pages: int = pydantic.Field() """ The total number of pages in the collection. """ - config: typing.Optional[ReturnConfigSpec] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_config.py b/src/hume/empathic_voice/types/return_config.py index 873a4a85..d7f90ac8 100644 --- a/src/hume/empathic_voice/types/return_config.py +++ b/src/hume/empathic_voice/types/return_config.py @@ -21,83 +21,61 @@ class ReturnConfig(UniversalBaseModel): A specific config version returned from the server """ - name: typing.Optional[str] = pydantic.Field(default=None) + builtin_tools: typing.Optional[typing.List[typing.Optional[ReturnBuiltinTool]]] = pydantic.Field(default=None) """ - Name applied to all versions of a particular Config. + List of built-in tools associated with this config """ - id: typing.Optional[str] = pydantic.Field(default=None) + created_on: typing.Optional[int] = pydantic.Field(default=None) """ - Identifier for a Config. Formatted as a UUID. + The timestamp when the first version of this config was created. """ - version: typing.Optional[int] = pydantic.Field(default=None) + ellm_model: typing.Optional[ReturnEllmModel] = None + event_messages: typing.Optional[ReturnEventMessageSpecs] = None + evi_version: typing.Optional[str] = pydantic.Field(default=None) """ - Version number for a Config. - - Configs, Prompts, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine configurations and revert to previous versions if needed. - - Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number. + The version of the EVI used with this config. """ - language_model: typing.Optional[ReturnLanguageModel] = pydantic.Field(default=None) + id: typing.Optional[str] = pydantic.Field(default=None) """ - The supplemental language model associated with this Config. - - This model is used to generate longer, more detailed responses from EVI. Choosing an appropriate supplemental language model for your use case is crucial for generating fast, high-quality responses from EVI. + Identifier for a Config. Formatted as a UUID. """ - builtin_tools: typing.Optional[typing.List[typing.Optional[ReturnBuiltinTool]]] = pydantic.Field(default=None) + language_model: typing.Optional[ReturnLanguageModel] = None + modified_on: typing.Optional[int] = pydantic.Field(default=None) """ - List of built-in tools associated with this Config. + The timestamp when this version of the config was created. """ - evi_version: typing.Optional[str] = pydantic.Field(default=None) + name: typing.Optional[str] = pydantic.Field(default=None) """ - Specifies the EVI version to use. See our [EVI Version Guide](/docs/speech-to-speech-evi/configuration/evi-version) for differences between versions. - - **We're officially sunsetting EVI versions 1 and 2 on August 30, 2025**. To keep things running smoothly, be sure to [migrate to EVI 3](/docs/speech-to-speech-evi/configuration/evi-version#migrating-to-evi-3) before then. + Name applied to all versions of a particular Config. """ - timeouts: typing.Optional[ReturnTimeoutSpecs] = None nudges: typing.Optional[ReturnNudgeSpec] = None - event_messages: typing.Optional[ReturnEventMessageSpecs] = None - ellm_model: typing.Optional[ReturnEllmModel] = pydantic.Field(default=None) - """ - The eLLM setup associated with this Config. - - Hume's eLLM (empathic Large Language Model) is a multimodal language model that takes into account both expression measures and language. The eLLM generates short, empathic language responses and guides text-to-speech (TTS) prosody. - """ - - voice: typing.Optional[ReturnVoice] = pydantic.Field(default=None) - """ - A voice specification associated with this Config. - """ - prompt: typing.Optional[ReturnPrompt] = None - webhooks: typing.Optional[typing.List[typing.Optional[ReturnWebhookSpec]]] = pydantic.Field(default=None) - """ - Map of webhooks associated with this config. - """ - - created_on: typing.Optional[int] = pydantic.Field(default=None) + timeouts: typing.Optional[ReturnTimeoutSpecs] = None + tools: typing.Optional[typing.List[typing.Optional[ReturnUserDefinedTool]]] = pydantic.Field(default=None) """ - Time at which the Config was created. Measured in seconds since the Unix epoch. + List of user-defined tools associated with this config. """ - modified_on: typing.Optional[int] = pydantic.Field(default=None) + version: typing.Optional[int] = pydantic.Field(default=None) """ - Time at which the Config was last modified. Measured in seconds since the Unix epoch. + Version number for a Config. Version numbers should be integers. The combination of configId and version number is unique. """ version_description: typing.Optional[str] = pydantic.Field(default=None) """ - An optional description of the Config version. + Description that is appended to a specific version of a Config. """ - tools: typing.Optional[typing.List[typing.Optional[ReturnUserDefinedTool]]] = pydantic.Field(default=None) + voice: typing.Optional[ReturnVoice] = None + webhooks: typing.Optional[typing.List[typing.Optional[ReturnWebhookSpec]]] = pydantic.Field(default=None) """ - List of user-defined tools associated with this Config. + Map of webhooks associated with this config. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_event_message_specs.py b/src/hume/empathic_voice/types/return_event_message_specs.py index 8e980f6a..93c0ee78 100644 --- a/src/hume/empathic_voice/types/return_event_message_specs.py +++ b/src/hume/empathic_voice/types/return_event_message_specs.py @@ -14,11 +14,6 @@ class ReturnEventMessageSpecs(UniversalBaseModel): Event messages are sent by the server when specific events occur during a chat session. These messages are used to configure behaviors for EVI, such as controlling how EVI starts a new conversation. """ - on_new_chat: typing.Optional[ReturnEventMessageSpec] = pydantic.Field(default=None) - """ - Specifies the initial message EVI provides when a new chat is started, such as a greeting or welcome message. - """ - on_inactivity_timeout: typing.Optional[ReturnEventMessageSpec] = pydantic.Field(default=None) """ Specifies the message EVI provides when the chat is about to be disconnected due to a user inactivity timeout, such as a message mentioning a lack of user input for a period of time. @@ -35,6 +30,11 @@ class ReturnEventMessageSpecs(UniversalBaseModel): Specifies the message EVI provides when the chat is disconnected due to reaching the maximum chat duration, such as a message mentioning the time limit for the chat has been reached. """ + on_new_chat: typing.Optional[ReturnEventMessageSpec] = pydantic.Field(default=None) + """ + Specifies the initial message EVI provides when a new chat is started, such as a greeting or welcome message. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_paged_chat_groups.py b/src/hume/empathic_voice/types/return_paged_chat_groups.py index d8651523..7bac0fe2 100644 --- a/src/hume/empathic_voice/types/return_paged_chat_groups.py +++ b/src/hume/empathic_voice/types/return_paged_chat_groups.py @@ -13,6 +13,11 @@ class ReturnPagedChatGroups(UniversalBaseModel): A paginated list of chat_groups returned from the server """ + chat_groups_page: typing.List[ReturnChatGroup] = pydantic.Field() + """ + List of Chat Groups and their metadata returned for the specified `page_number` and `page_size`. + """ + page_number: int = pydantic.Field() """ The page number of the returned list. @@ -27,11 +32,6 @@ class ReturnPagedChatGroups(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() - """ - The total number of pages in the collection. - """ - pagination_direction: ReturnPagedChatGroupsPaginationDirection = pydantic.Field() """ Indicates the order in which the paginated results are presented, based on their creation date. @@ -39,9 +39,9 @@ class ReturnPagedChatGroups(UniversalBaseModel): It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. """ - chat_groups_page: typing.List[ReturnChatGroup] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of Chat Groups and their metadata returned for the specified `page_number` and `page_size`. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_paged_chats.py b/src/hume/empathic_voice/types/return_paged_chats.py index b11ecfcf..5fafa50d 100644 --- a/src/hume/empathic_voice/types/return_paged_chats.py +++ b/src/hume/empathic_voice/types/return_paged_chats.py @@ -13,6 +13,11 @@ class ReturnPagedChats(UniversalBaseModel): A paginated list of chats returned from the server """ + chats_page: typing.List[ReturnChat] = pydantic.Field() + """ + List of Chats and their metadata returned for the specified `page_number` and `page_size`. + """ + page_number: int = pydantic.Field() """ The page number of the returned list. @@ -27,11 +32,6 @@ class ReturnPagedChats(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() - """ - The total number of pages in the collection. - """ - pagination_direction: ReturnPagedChatsPaginationDirection = pydantic.Field() """ Indicates the order in which the paginated results are presented, based on their creation date. @@ -39,9 +39,9 @@ class ReturnPagedChats(UniversalBaseModel): It shows `ASC` for ascending order (chronological, with the oldest records first) or `DESC` for descending order (reverse-chronological, with the newest records first). This value corresponds to the `ascending_order` query parameter used in the request. """ - chats_page: typing.List[ReturnChat] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of Chats and their metadata returned for the specified `page_number` and `page_size`. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_paged_configs.py b/src/hume/empathic_voice/types/return_paged_configs.py index ba4926c7..07df6108 100644 --- a/src/hume/empathic_voice/types/return_paged_configs.py +++ b/src/hume/empathic_voice/types/return_paged_configs.py @@ -12,6 +12,11 @@ class ReturnPagedConfigs(UniversalBaseModel): A paginated list of config versions returned from the server """ + configs_page: typing.Optional[typing.List[ReturnConfig]] = pydantic.Field(default=None) + """ + List of configs returned for the specified `page_number` and `page_size`. + """ + page_number: typing.Optional[int] = pydantic.Field(default=None) """ The page number of the returned list. @@ -31,11 +36,6 @@ class ReturnPagedConfigs(UniversalBaseModel): The total number of pages in the collection. """ - configs_page: typing.Optional[typing.List[ReturnConfig]] = pydantic.Field(default=None) - """ - List of configs returned for the specified `page_number` and `page_size`. - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_paged_prompts.py b/src/hume/empathic_voice/types/return_paged_prompts.py index f5df1167..0667434a 100644 --- a/src/hume/empathic_voice/types/return_paged_prompts.py +++ b/src/hume/empathic_voice/types/return_paged_prompts.py @@ -26,14 +26,14 @@ class ReturnPagedPrompts(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() + prompts_page: typing.List[typing.Optional[ReturnPrompt]] = pydantic.Field() """ - The total number of pages in the collection. + List of prompts returned for the specified `page_number` and `page_size`. """ - prompts_page: typing.List[typing.Optional[ReturnPrompt]] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of prompts returned for the specified `page_number` and `page_size`. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_paged_user_defined_tools.py b/src/hume/empathic_voice/types/return_paged_user_defined_tools.py index d2b744b0..84d69942 100644 --- a/src/hume/empathic_voice/types/return_paged_user_defined_tools.py +++ b/src/hume/empathic_voice/types/return_paged_user_defined_tools.py @@ -26,14 +26,14 @@ class ReturnPagedUserDefinedTools(UniversalBaseModel): This value corresponds to the `page_size` parameter specified in the request. """ - total_pages: int = pydantic.Field() + tools_page: typing.List[typing.Optional[ReturnUserDefinedTool]] = pydantic.Field() """ - The total number of pages in the collection. + List of tools returned for the specified `page_number` and `page_size`. """ - tools_page: typing.List[typing.Optional[ReturnUserDefinedTool]] = pydantic.Field() + total_pages: int = pydantic.Field() """ - List of tools returned for the specified `page_number` and `page_size`. + The total number of pages in the collection. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_prompt.py b/src/hume/empathic_voice/types/return_prompt.py index 7ab9ec73..e3fe8219 100644 --- a/src/hume/empathic_voice/types/return_prompt.py +++ b/src/hume/empathic_voice/types/return_prompt.py @@ -4,17 +4,16 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from .return_prompt_version_type import ReturnPromptVersionType class ReturnPrompt(UniversalBaseModel): """ - A Prompt associated with this Config. + A specific prompt version returned from the server """ - name: str = pydantic.Field() + created_on: int = pydantic.Field() """ - Name applied to all versions of a particular Prompt. + The timestamp when the first version of this prompt was created. """ id: str = pydantic.Field() @@ -22,40 +21,34 @@ class ReturnPrompt(UniversalBaseModel): Identifier for a Prompt. Formatted as a UUID. """ - text: str = pydantic.Field() + modified_on: int = pydantic.Field() """ - Instructions used to shape EVI's behavior, responses, and style. - - You can use the Prompt to define a specific goal or role for EVI, specifying how it should act or what it should focus on during the conversation. For example, EVI can be instructed to act as a customer support representative, a fitness coach, or a travel advisor, each with its own set of behaviors and response styles. For help writing a system prompt, see our [Prompting Guide](/docs/speech-to-speech-evi/guides/prompting). + The timestamp when this version of the prompt was created. """ - version: int = pydantic.Field() + name: str = pydantic.Field() """ - Version number for a Prompt. - - Prompts, Configs, Custom Voices, and Tools are versioned. This versioning system supports iterative development, allowing you to progressively refine prompts and revert to previous versions if needed. - - Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number. + Name applied to all versions of a particular Prompt. """ - version_type: ReturnPromptVersionType = pydantic.Field() + text: str = pydantic.Field() """ - Versioning method for a Prompt. Either `FIXED` for using a fixed version number or `LATEST` for auto-updating to the latest version. + Text used for this version of the Prompt. """ - created_on: int = pydantic.Field() + version: int = pydantic.Field() """ - Time at which the Prompt was created. Measured in seconds since the Unix epoch. + Version number for a Prompt. Version numbers should be integers. The combination of configId and version number is unique. """ - modified_on: int = pydantic.Field() + version_description: typing.Optional[str] = pydantic.Field(default=None) """ - Time at which the Prompt was last modified. Measured in seconds since the Unix epoch. + Description that is appended to a specific version of a Prompt. """ - version_description: typing.Optional[str] = pydantic.Field(default=None) + version_type: str = pydantic.Field() """ - An optional description of the Prompt version. + Indicates whether this prompt is using a fixed version number or auto-updating to the latest version. Values from the VersionType enum. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_timeout_spec.py b/src/hume/empathic_voice/types/return_timeout_spec.py index e1ff5b7b..8a89879c 100644 --- a/src/hume/empathic_voice/types/return_timeout_spec.py +++ b/src/hume/empathic_voice/types/return_timeout_spec.py @@ -11,6 +11,11 @@ class ReturnTimeoutSpec(UniversalBaseModel): A specific timeout configuration to be returned from the server """ + duration_secs: typing.Optional[int] = pydantic.Field(default=None) + """ + Duration in seconds for the timeout (e.g. 600 seconds represents 10 minutes). + """ + enabled: bool = pydantic.Field() """ Boolean indicating if this timeout is enabled. @@ -18,11 +23,6 @@ class ReturnTimeoutSpec(UniversalBaseModel): If set to false, EVI will not timeout due to a specified duration being reached. However, the conversation will eventually disconnect after 1,800 seconds (30 minutes), which is the maximum WebSocket duration limit for EVI. """ - duration_secs: typing.Optional[int] = pydantic.Field(default=None) - """ - Duration in seconds for the timeout (e.g. 600 seconds represents 10 minutes). - """ - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/empathic_voice/types/return_user_defined_tool.py b/src/hume/empathic_voice/types/return_user_defined_tool.py index c1f7244e..9d25ba97 100644 --- a/src/hume/empathic_voice/types/return_user_defined_tool.py +++ b/src/hume/empathic_voice/types/return_user_defined_tool.py @@ -13,33 +13,29 @@ class ReturnUserDefinedTool(UniversalBaseModel): A specific tool version returned from the server """ - tool_type: ReturnUserDefinedToolToolType = pydantic.Field() + created_on: int = pydantic.Field() """ - Type of Tool. Either `BUILTIN` for natively implemented tools, like web search, or `FUNCTION` for user-defined tools. + Time at which the Tool was created. Measured in seconds since the Unix epoch. """ - id: str = pydantic.Field() + description: typing.Optional[str] = pydantic.Field(default=None) """ - Identifier for a Tool. Formatted as a UUID. + An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. """ - version: int = pydantic.Field() + fallback_content: typing.Optional[str] = pydantic.Field(default=None) """ - Version number for a Tool. - - Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. - - Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. + Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. """ - version_type: ReturnUserDefinedToolVersionType = pydantic.Field() + id: str = pydantic.Field() """ - Versioning method for a Tool. Either `FIXED` for using a fixed version number or `LATEST` for auto-updating to the latest version. + Identifier for a Tool. Formatted as a UUID. """ - version_description: typing.Optional[str] = pydantic.Field(default=None) + modified_on: int = pydantic.Field() """ - An optional description of the Tool version. + Time at which the Tool was last modified. Measured in seconds since the Unix epoch. """ name: str = pydantic.Field() @@ -47,31 +43,35 @@ class ReturnUserDefinedTool(UniversalBaseModel): Name applied to all versions of a particular Tool. """ - created_on: int = pydantic.Field() + parameters: str = pydantic.Field() """ - Time at which the Tool was created. Measured in seconds since the Unix epoch. + Stringified JSON defining the parameters used by this version of the Tool. + + These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the tool receives data in the expected format. """ - modified_on: int = pydantic.Field() + tool_type: ReturnUserDefinedToolToolType = pydantic.Field() """ - Time at which the Tool was last modified. Measured in seconds since the Unix epoch. + Type of Tool. Either `BUILTIN` for natively implemented tools, like web search, or `FUNCTION` for user-defined tools. """ - fallback_content: typing.Optional[str] = pydantic.Field(default=None) + version: int = pydantic.Field() """ - Optional text passed to the supplemental LLM in place of the tool call result. The LLM then uses this text to generate a response back to the user, ensuring continuity in the conversation if the Tool errors. + Version number for a Tool. + + Tools, Configs, Custom Voices, and Prompts are versioned. This versioning system supports iterative development, allowing you to progressively refine tools and revert to previous versions if needed. + + Version numbers are integer values representing different iterations of the Tool. Each update to the Tool increments its version number. """ - description: typing.Optional[str] = pydantic.Field(default=None) + version_description: typing.Optional[str] = pydantic.Field(default=None) """ - An optional description of what the Tool does, used by the supplemental LLM to choose when and how to call the function. + An optional description of the Tool version. """ - parameters: str = pydantic.Field() + version_type: ReturnUserDefinedToolVersionType = pydantic.Field() """ - Stringified JSON defining the parameters used by this version of the Tool. - - These parameters define the inputs needed for the Tool's execution, including the expected data type and description for each input field. Structured as a stringified JSON schema, this format ensures the tool receives data in the expected format. + Versioning method for a Tool. Either `FIXED` for using a fixed version number or `LATEST` for auto-updating to the latest version. """ if IS_PYDANTIC_V2: diff --git a/src/hume/empathic_voice/types/return_voice.py b/src/hume/empathic_voice/types/return_voice.py index 39fb9e99..a92b32d0 100644 --- a/src/hume/empathic_voice/types/return_voice.py +++ b/src/hume/empathic_voice/types/return_voice.py @@ -12,10 +12,10 @@ class ReturnVoice(UniversalBaseModel): An Octave voice available for text-to-speech """ + compatible_octave_models: typing.Optional[typing.List[str]] = None id: typing.Optional[str] = None name: typing.Optional[str] = None provider: typing.Optional[VoiceProvider] = None - compatible_octave_models: typing.Optional[typing.List[str]] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/hume/empathic_voice/types/return_webhook_event_type.py b/src/hume/empathic_voice/types/return_webhook_event_type.py index 9cbba80a..97cc4497 100644 --- a/src/hume/empathic_voice/types/return_webhook_event_type.py +++ b/src/hume/empathic_voice/types/return_webhook_event_type.py @@ -2,4 +2,4 @@ import typing -ReturnWebhookEventType = typing.Union[typing.Literal["chat_started", "chat_ended"], typing.Any] +ReturnWebhookEventType = typing.Union[typing.Literal["chat_started", "chat_ended", "tool_call"], typing.Any] diff --git a/src/hume/empathic_voice/types/return_webhook_spec.py b/src/hume/empathic_voice/types/return_webhook_spec.py index cc97b06a..f6304f9c 100644 --- a/src/hume/empathic_voice/types/return_webhook_spec.py +++ b/src/hume/empathic_voice/types/return_webhook_spec.py @@ -12,11 +12,6 @@ class ReturnWebhookSpec(UniversalBaseModel): Collection of webhook URL endpoints to be returned from the server """ - url: str = pydantic.Field() - """ - The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. - """ - events: typing.List[ReturnWebhookEventType] = pydantic.Field() """ The list of events the specified URL is subscribed to. @@ -24,6 +19,11 @@ class ReturnWebhookSpec(UniversalBaseModel): See our [webhooks guide](/docs/speech-to-speech-evi/configuration/build-a-configuration#supported-events) for more information on supported events. """ + url: str = pydantic.Field() + """ + The URL where event payloads will be sent. This must be a valid https URL to ensure secure communication. The server at this URL must accept POST requests with a JSON payload. + """ + if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/tts/raw_client.py b/src/hume/tts/raw_client.py index 1d09839c..089211c6 100644 --- a/src/hume/tts/raw_client.py +++ b/src/hume/tts/raw_client.py @@ -64,7 +64,7 @@ def synthesize_json( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -189,7 +189,7 @@ def synthesize_file( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -315,7 +315,7 @@ def synthesize_file_streaming( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -443,7 +443,7 @@ def synthesize_json_streaming( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -777,7 +777,7 @@ async def synthesize_json( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -902,7 +902,7 @@ async def synthesize_file( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -1029,7 +1029,7 @@ async def synthesize_file_streaming( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. @@ -1158,7 +1158,7 @@ async def synthesize_json_streaming( Specifies the output audio file format. include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. num_generations : typing.Optional[int] Number of audio generations to produce from the input utterances. diff --git a/src/hume/tts/types/error_response.py b/src/hume/tts/types/error_response.py index f99f009f..33b3f718 100644 --- a/src/hume/tts/types/error_response.py +++ b/src/hume/tts/types/error_response.py @@ -7,9 +7,9 @@ class ErrorResponse(UniversalBaseModel): + code: typing.Optional[str] = None error: typing.Optional[str] = None message: typing.Optional[str] = None - code: typing.Optional[str] = None if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/hume/tts/types/posted_tts.py b/src/hume/tts/types/posted_tts.py index 73454d52..62f3d338 100644 --- a/src/hume/tts/types/posted_tts.py +++ b/src/hume/tts/types/posted_tts.py @@ -24,7 +24,7 @@ class PostedTts(UniversalBaseModel): include_timestamp_types: typing.Optional[typing.List[TimestampType]] = pydantic.Field(default=None) """ - The set of timestamp types to include in the response. + The set of timestamp types to include in the response. Only supported for Octave 2 requests. """ num_generations: typing.Optional[int] = pydantic.Field(default=None) diff --git a/src/hume/tts/types/return_voice.py b/src/hume/tts/types/return_voice.py index c2575107..20c8d33d 100644 --- a/src/hume/tts/types/return_voice.py +++ b/src/hume/tts/types/return_voice.py @@ -12,6 +12,7 @@ class ReturnVoice(UniversalBaseModel): An Octave voice available for text-to-speech """ + compatible_octave_models: typing.Optional[typing.List[str]] = None id: typing.Optional[str] = pydantic.Field(default=None) """ ID of the voice in the `Voice Library`. @@ -29,8 +30,6 @@ class ReturnVoice(UniversalBaseModel): Voices created through this endpoint will always have the provider set to `CUSTOM_VOICE`, indicating a custom voice stored in your account. """ - compatible_octave_models: typing.Optional[typing.List[str]] = None - if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 else: diff --git a/src/hume/tts/types/snippet.py b/src/hume/tts/types/snippet.py index 36c8b89f..f7dd2f82 100644 --- a/src/hume/tts/types/snippet.py +++ b/src/hume/tts/types/snippet.py @@ -30,7 +30,7 @@ class Snippet(UniversalBaseModel): timestamps: typing.List[Timestamp] = pydantic.Field() """ - A list of word or phoneme level timestamps for the generated audio. + A list of word or phoneme level timestamps for the generated audio. Timestamps are only returned for Octave 2 requests. """ transcribed_text: typing.Optional[str] = pydantic.Field(default=None) diff --git a/src/hume/tts/types/timestamp.py b/src/hume/tts/types/timestamp.py index 3f54d6c6..10d343a2 100644 --- a/src/hume/tts/types/timestamp.py +++ b/src/hume/tts/types/timestamp.py @@ -9,8 +9,16 @@ class Timestamp(UniversalBaseModel): - text: str - time: MillisecondInterval + text: str = pydantic.Field() + """ + The word or phoneme text that the timestamp corresponds to. + """ + + time: MillisecondInterval = pydantic.Field() + """ + The start and end timestamps for the word or phoneme in milliseconds. + """ + type: TimestampType if IS_PYDANTIC_V2: From 2aa008e6e3b35b774dee50813e0fc6606a6721a9 Mon Sep 17 00:00:00 2001 From: twitchard Date: Fri, 21 Nov 2025 10:36:58 -0600 Subject: [PATCH 2/5] Add .diff files for fern-ignored files --- src/hume/empathic_voice/chat/client.py.diff | 422 +++++++++++++++++ .../empathic_voice/chat/raw_client.py.diff | 112 +++++ .../empathic_voice/chat/socket_client.py.diff | 161 +++++++ src/hume/empathic_voice/client.py.diff | 201 ++++++++ .../batch/types/inference_job.py.diff | 24 + .../expression_measurement/client.py.diff | 70 +++ .../stream/stream/socket_client.py.diff | 170 +++++++ src/hume/tts/client.py.diff | 438 ++++++++++++++++++ 8 files changed, 1598 insertions(+) create mode 100644 src/hume/empathic_voice/chat/client.py.diff create mode 100644 src/hume/empathic_voice/chat/raw_client.py.diff create mode 100644 src/hume/empathic_voice/chat/socket_client.py.diff create mode 100644 src/hume/empathic_voice/client.py.diff create mode 100644 src/hume/expression_measurement/batch/types/inference_job.py.diff create mode 100644 src/hume/expression_measurement/client.py.diff create mode 100644 src/hume/expression_measurement/stream/stream/socket_client.py.diff create mode 100644 src/hume/tts/client.py.diff diff --git a/src/hume/empathic_voice/chat/client.py.diff b/src/hume/empathic_voice/chat/client.py.diff new file mode 100644 index 00000000..29d9577b --- /dev/null +++ b/src/hume/empathic_voice/chat/client.py.diff @@ -0,0 +1,422 @@ +diff --git a/src/hume/empathic_voice/chat/client.py b/src/hume/empathic_voice/chat/client.py +index 2a3732f5..910917c9 100644 +--- a/src/hume/empathic_voice/chat/client.py ++++ b/src/hume/empathic_voice/chat/client.py +@@ -1,11 +1,7 @@ + # This file was auto-generated by Fern from our API Definition. + +-from contextlib import asynccontextmanager, contextmanager +- +-import json + import typing +- +-from typing_extensions import deprecated ++from contextlib import asynccontextmanager, contextmanager + + import httpx + import websockets.exceptions +@@ -14,34 +10,16 @@ from ...core.api_error import ApiError + from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + from ...core.request_options import RequestOptions + from ...core.serialization import convert_and_respect_annotation_metadata +-from ...core.query_encoder import single_query_encoder + from ..types.connect_session_settings import ConnectSessionSettings + from .raw_client import AsyncRawChatClient, RawChatClient +-from .socket_client import AsyncChatSocketClient, ChatSocketClient, ChatConnectOptions +- +-from ...core.events import EventEmitterMixin, EventType +-from ...core.pydantic_utilities import parse_obj_as +-from ..types.assistant_input import AssistantInput +-from ..types.audio_input import AudioInput +-from ..types.pause_assistant_message import PauseAssistantMessage +-from ..types.resume_assistant_message import ResumeAssistantMessage +-from ..types.session_settings import SessionSettings +-from ..types.tool_error_message import ToolErrorMessage +-from ..types.tool_response_message import ToolResponseMessage +-from ..types.user_input import UserInput +-from .types.publish_event import PublishEvent +-from ..types.subscribe_event import SubscribeEvent +- +-from ...core.api_error import ApiError +-import asyncio +- +-from ...core.websocket import OnErrorHandlerType, OnMessageHandlerType, OnOpenCloseHandlerType ++from .socket_client import AsyncChatSocketClient, ChatSocketClient + + try: + from websockets.legacy.client import connect as websockets_client_connect # type: ignore + except ImportError: + from websockets import connect as websockets_client_connect # type: ignore + ++ + class ChatClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawChatClient(client_wrapper=client_wrapper) +@@ -62,6 +40,7 @@ class ChatClient: + self, + *, + access_token: typing.Optional[str] = None, ++ allow_connection: typing.Optional[bool] = None, + config_id: typing.Optional[str] = None, + config_version: typing.Optional[int] = None, + event_limit: typing.Optional[int] = None, +@@ -69,7 +48,6 @@ class ChatClient: + verbose_transcription: typing.Optional[bool] = None, + api_key: typing.Optional[str] = None, + session_settings: ConnectSessionSettings, +- allow_connection: typing.Optional[bool] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.Iterator[ChatSocketClient]: + """ +@@ -84,6 +62,9 @@ class ChatClient: + + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). + ++ allow_connection : typing.Optional[bool] ++ Allows external connections to this chat via the /connect endpoint. ++ + config_id : typing.Optional[str] + The unique identifier for an EVI configuration. + +@@ -137,6 +118,8 @@ class ChatClient: + query_params = httpx.QueryParams() + if access_token is not None: + query_params = query_params.add("access_token", access_token) ++ if allow_connection is not None: ++ query_params = query_params.add("allow_connection", allow_connection) + if config_id is not None: + query_params = query_params.add("config_id", config_id) + if config_version is not None: +@@ -149,12 +132,18 @@ class ChatClient: + query_params = query_params.add("verbose_transcription", verbose_transcription) + if api_key is not None: + query_params = query_params.add("api_key", api_key) +- if allow_connection is not None: +- query_params = query_params.add("allow_connection", str(allow_connection).lower()) +- if session_settings is not None: +- flattened_params = single_query_encoder("session_settings", session_settings) +- for param_key, param_value in flattened_params: +- query_params = query_params.add(param_key, str(param_value)) ++ if ( ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ) ++ is not None ++ ): ++ query_params = query_params.add( ++ "session_settings", ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ), ++ ) + ws_url = ws_url + f"?{query_params}" + headers = self._raw_client._client_wrapper.get_headers() + if request_options and "additional_headers" in request_options: +@@ -197,14 +186,14 @@ class AsyncChatClient: + self, + *, + access_token: typing.Optional[str] = None, ++ allow_connection: typing.Optional[bool] = None, + config_id: typing.Optional[str] = None, + config_version: typing.Optional[int] = None, + event_limit: typing.Optional[int] = None, + resumed_chat_group_id: typing.Optional[str] = None, + verbose_transcription: typing.Optional[bool] = None, + api_key: typing.Optional[str] = None, +- session_settings: typing.Optional[ConnectSessionSettings] = None, +- allow_connection: typing.Optional[bool] = None, ++ session_settings: ConnectSessionSettings, + request_options: typing.Optional[RequestOptions] = None, + ) -> typing.AsyncIterator[AsyncChatSocketClient]: + """ +@@ -219,6 +208,9 @@ class AsyncChatClient: + + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). + ++ allow_connection : typing.Optional[bool] ++ Allows external connections to this chat via the /connect endpoint. ++ + config_id : typing.Optional[str] + The unique identifier for an EVI configuration. + +@@ -261,11 +253,6 @@ class AsyncChatClient: + + session_settings : ConnectSessionSettings + +- allow_connection : typing.Optional[bool] +- Flag that allows the resulting Chat to accept secondary connections via +- the control plane `/connect` endpoint. Defaults to `False` on the server. +- Set to `True` to enable observer connections for the session. +- + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + +@@ -277,6 +264,8 @@ class AsyncChatClient: + query_params = httpx.QueryParams() + if access_token is not None: + query_params = query_params.add("access_token", access_token) ++ if allow_connection is not None: ++ query_params = query_params.add("allow_connection", allow_connection) + if config_id is not None: + query_params = query_params.add("config_id", config_id) + if config_version is not None: +@@ -289,12 +278,18 @@ class AsyncChatClient: + query_params = query_params.add("verbose_transcription", verbose_transcription) + if api_key is not None: + query_params = query_params.add("api_key", api_key) +- if allow_connection is not None: +- query_params = query_params.add("allow_connection", str(allow_connection).lower()) +- if session_settings is not None: +- flattened_params = single_query_encoder("session_settings", session_settings) +- for param_key, param_value in flattened_params: +- query_params = query_params.add(param_key, str(param_value)) ++ if ( ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ) ++ is not None ++ ): ++ query_params = query_params.add( ++ "session_settings", ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ), ++ ) + ws_url = ws_url + f"?{query_params}" + headers = self._raw_client._client_wrapper.get_headers() + if request_options and "additional_headers" in request_options: +@@ -315,234 +310,3 @@ class AsyncChatClient: + headers=dict(headers), + body="Unexpected error when initializing websocket connection.", + ) +- +- @deprecated("") +- async def _wrap_on_open_close( +- self, on_open: typing.Optional[OnOpenCloseHandlerType] +- ): +- if on_open is not None: +- if asyncio.iscoroutinefunction(on_open): +- await on_open() +- else: +- on_open() +- +- @deprecated("") +- async def _wrap_on_error( +- self, exc: Exception, on_error: typing.Optional[OnErrorHandlerType] +- ) -> None: +- if on_error is not None: +- if asyncio.iscoroutinefunction(on_error): +- await on_error(exc) +- else: +- on_error(exc) +- +- @deprecated("") +- async def _wrap_on_message( +- self, +- message: SubscribeEvent, +- on_message: typing.Optional[OnMessageHandlerType[SubscribeEvent]], +- ) -> None: +- if on_message is not None: +- if asyncio.iscoroutinefunction(on_message): +- await on_message(message) +- else: +- on_message(message) +- +- async def _process_connection( +- self, +- connection: AsyncChatSocketClient, +- on_message: typing.Optional[OnMessageHandlerType], +- on_error: typing.Optional[OnErrorHandlerType], +- ) -> None: +- async for message in connection: +- try: +- await self._wrap_on_message(message, on_message) +- except Exception as exc: +- await self._wrap_on_error(exc, on_error) +- +- def _construct_ws_uri(self, options: typing.Optional[ChatConnectOptions]): +- query_params = httpx.QueryParams() +- +- api_key = self._raw_client._client_wrapper.api_key +- if options is not None: +- maybe_api_key = options.get("api_key") +- if maybe_api_key is not None: +- api_key = maybe_api_key +- maybe_config_id = options.get("config_id") +- if maybe_config_id is not None: +- query_params = query_params.add("config_id", maybe_config_id) +- maybe_config_version = options.get("config_version") +- if maybe_config_version is not None: +- query_params = query_params.add( +- "config_version", maybe_config_version +- ) +- maybe_resumed_chat_group_id = options.get("resumed_chat_group_id") +- if maybe_resumed_chat_group_id is not None: +- query_params = query_params.add( +- "resumed_chat_group_id", maybe_resumed_chat_group_id +- ) +- maybe_verbose_transcription = options.get("verbose_transcription") +- if maybe_verbose_transcription is not None: +- query_params = query_params.add( +- "verbose_transcription", +- "true" if maybe_verbose_transcription else "false", +- ) +- elif api_key is not None: +- query_params = query_params.add("apiKey", api_key) +- +- maybe_voice_id = options.get("voice_id") +- if maybe_voice_id is not None: +- query_params = query_params.add("voice_id", maybe_voice_id) +- +- maybe_session_settings = options.get("session_settings") +- if maybe_session_settings is not None: +- # Handle audio settings +- audio = maybe_session_settings.get("audio") +- if audio is not None: +- channels = audio.get("channels") +- if channels is not None: +- query_params = query_params.add( +- "session_settings[audio][channels]", str(channels) +- ) +- encoding = audio.get("encoding") +- if encoding is not None: +- query_params = query_params.add( +- "session_settings[audio][encoding]", str(encoding) +- ) +- sample_rate = audio.get("sample_rate") +- if sample_rate is not None: +- query_params = query_params.add( +- "session_settings[audio][sample_rate]", str(sample_rate) +- ) +- +- # Handle context settings +- context = maybe_session_settings.get("context") +- if context is not None: +- text = context.get("text") +- if text is not None: +- query_params = query_params.add( +- "session_settings[context][text]", str(text) +- ) +- context_type = context.get("type") +- if context_type is not None: +- query_params = query_params.add( +- "session_settings[context][type]", str(context_type) +- ) +- +- # Handle top-level session settings +- custom_session_id = maybe_session_settings.get("custom_session_id") +- if custom_session_id is not None: +- query_params = query_params.add( +- "session_settings[custom_session_id]", str(custom_session_id) +- ) +- +- event_limit = maybe_session_settings.get("event_limit") +- if event_limit is not None: +- query_params = query_params.add( +- "session_settings[event_limit]", str(event_limit) +- ) +- +- language_model_api_key = maybe_session_settings.get("language_model_api_key") +- if language_model_api_key is not None: +- query_params = query_params.add( +- "session_settings[language_model_api_key]", str(language_model_api_key) +- ) +- +- system_prompt = maybe_session_settings.get("system_prompt") +- if system_prompt is not None: +- query_params = query_params.add( +- "session_settings[system_prompt]", str(system_prompt) +- ) +- +- variables = maybe_session_settings.get("variables") +- if variables is not None: +- query_params = query_params.add( +- "session_settings[variables]", json.dumps(variables) +- ) +- +- voice_id_setting = maybe_session_settings.get("voice_id") +- if voice_id_setting is not None: +- query_params = query_params.add( +- "session_settings[voice_id]", str(voice_id_setting) +- ) +- elif api_key is not None: +- query_params = query_params.add("apiKey", api_key) +- +- base = self._raw_client._client_wrapper.get_environment().evi + "/chat" +- return f"{base}?{query_params}" +- +- @deprecated("Use .on() instead.") +- @asynccontextmanager +- async def connect_with_callbacks( +- self, +- options: typing.Optional[ChatConnectOptions] = None, +- on_open: typing.Optional[OnOpenCloseHandlerType] = None, +- on_message: typing.Optional[OnMessageHandlerType[SubscribeEvent]] = None, +- on_close: typing.Optional[OnOpenCloseHandlerType] = None, +- on_error: typing.Optional[OnErrorHandlerType] = None, +- ) -> typing.AsyncIterator["AsyncChatSocketClient"]: +- """ +- Parameters +- ---------- +- on_open : Optional[OnOpenCloseHandlerType] +- A callable to be invoked on the opening of the websocket connection. +- +- on_message : Optional[OnMessageHandlerType[SubscribeEvent]] +- A callable to be invoked on receiving a message from the websocket connection. This callback should expect a `SubscribeEvent` object. +- +- on_close : Optional[OnOpenCloseHandlerType] +- A callable to be invoked on the closing of the websocket connection. +- +- on_error : Optional[OnErrorHandlerType] +- A callable to be invoked on receiving an error from the websocket connection. +- +- Yields +- ------- +- AsyncIterator["AsyncChatSocketClient"] +- """ +- +- ws_uri = self._construct_ws_uri(options) +- +- background_task: typing.Optional[asyncio.Task[None]] = None +- +- try: +- async with websockets.connect( +- ws_uri, +- extra_headers=self._raw_client._client_wrapper.get_headers(), +- ) as protocol: +- await self._wrap_on_open_close(on_open) +- connection = AsyncChatSocketClient(websocket=protocol) +- background_task = asyncio.create_task( +- self._process_connection(connection, on_message, on_error) +- ) +- +- yield connection +- +- # Special case authentication errors +- except websockets.exceptions.InvalidStatusCode as exc: +- status_code: int = exc.status_code +- if status_code == 401: +- raise ApiError( +- status_code=status_code, +- body="Websocket initialized with invalid credentials.", +- ) from exc +- raise ApiError( +- status_code=status_code, +- body="Unexpected error when initializing websocket connection.", +- ) from exc +- +- # Except all other errors to apply the on_error handler +- except Exception as exc: +- await self._wrap_on_error(exc, on_error) +- raise +- +- # Finally, apply the on_close handler +- finally: +- if background_task is not None: +- background_task.cancel() +- try: +- await background_task +- except asyncio.CancelledError: +- pass +- await self._wrap_on_open_close(on_close) +- diff --git a/src/hume/empathic_voice/chat/raw_client.py.diff b/src/hume/empathic_voice/chat/raw_client.py.diff new file mode 100644 index 00000000..cb61a2b3 --- /dev/null +++ b/src/hume/empathic_voice/chat/raw_client.py.diff @@ -0,0 +1,112 @@ +diff --git a/src/hume/empathic_voice/chat/raw_client.py b/src/hume/empathic_voice/chat/raw_client.py +index fefee870..ed718e98 100644 +--- a/src/hume/empathic_voice/chat/raw_client.py ++++ b/src/hume/empathic_voice/chat/raw_client.py +@@ -10,7 +10,6 @@ from ...core.api_error import ApiError + from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + from ...core.request_options import RequestOptions + from ...core.serialization import convert_and_respect_annotation_metadata +-from ...core.query_encoder import single_query_encoder + from ..types.connect_session_settings import ConnectSessionSettings + from .socket_client import AsyncChatSocketClient, ChatSocketClient + +@@ -29,6 +28,7 @@ class RawChatClient: + self, + *, + access_token: typing.Optional[str] = None, ++ allow_connection: typing.Optional[bool] = None, + config_id: typing.Optional[str] = None, + config_version: typing.Optional[int] = None, + event_limit: typing.Optional[int] = None, +@@ -50,6 +50,9 @@ class RawChatClient: + + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). + ++ allow_connection : typing.Optional[bool] ++ Allows external connections to this chat via the /connect endpoint. ++ + config_id : typing.Optional[str] + The unique identifier for an EVI configuration. + +@@ -103,6 +106,8 @@ class RawChatClient: + query_params = httpx.QueryParams() + if access_token is not None: + query_params = query_params.add("access_token", access_token) ++ if allow_connection is not None: ++ query_params = query_params.add("allow_connection", allow_connection) + if config_id is not None: + query_params = query_params.add("config_id", config_id) + if config_version is not None: +@@ -115,10 +120,18 @@ class RawChatClient: + query_params = query_params.add("verbose_transcription", verbose_transcription) + if api_key is not None: + query_params = query_params.add("api_key", api_key) +- if session_settings is not None: +- flattened_params = single_query_encoder("session_settings", session_settings) +- for param_key, param_value in flattened_params: +- query_params = query_params.add(param_key, str(param_value)) ++ if ( ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ) ++ is not None ++ ): ++ query_params = query_params.add( ++ "session_settings", ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ), ++ ) + ws_url = ws_url + f"?{query_params}" + headers = self._client_wrapper.get_headers() + if request_options and "additional_headers" in request_options: +@@ -150,6 +163,7 @@ class AsyncRawChatClient: + self, + *, + access_token: typing.Optional[str] = None, ++ allow_connection: typing.Optional[bool] = None, + config_id: typing.Optional[str] = None, + config_version: typing.Optional[int] = None, + event_limit: typing.Optional[int] = None, +@@ -171,6 +185,9 @@ class AsyncRawChatClient: + + For more details, refer to the [Authentication Strategies Guide](/docs/introduction/api-key#authentication-strategies). + ++ allow_connection : typing.Optional[bool] ++ Allows external connections to this chat via the /connect endpoint. ++ + config_id : typing.Optional[str] + The unique identifier for an EVI configuration. + +@@ -224,6 +241,8 @@ class AsyncRawChatClient: + query_params = httpx.QueryParams() + if access_token is not None: + query_params = query_params.add("access_token", access_token) ++ if allow_connection is not None: ++ query_params = query_params.add("allow_connection", allow_connection) + if config_id is not None: + query_params = query_params.add("config_id", config_id) + if config_version is not None: +@@ -236,10 +255,18 @@ class AsyncRawChatClient: + query_params = query_params.add("verbose_transcription", verbose_transcription) + if api_key is not None: + query_params = query_params.add("api_key", api_key) +- if session_settings is not None: +- flattened_params = single_query_encoder("session_settings", session_settings) +- for param_key, param_value in flattened_params: +- query_params = query_params.add(param_key, str(param_value)) ++ if ( ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ) ++ is not None ++ ): ++ query_params = query_params.add( ++ "session_settings", ++ convert_and_respect_annotation_metadata( ++ object_=session_settings, annotation=ConnectSessionSettings, direction="write" ++ ), ++ ) + ws_url = ws_url + f"?{query_params}" + headers = self._client_wrapper.get_headers() + if request_options and "additional_headers" in request_options: diff --git a/src/hume/empathic_voice/chat/socket_client.py.diff b/src/hume/empathic_voice/chat/socket_client.py.diff new file mode 100644 index 00000000..77c80ea0 --- /dev/null +++ b/src/hume/empathic_voice/chat/socket_client.py.diff @@ -0,0 +1,161 @@ +diff --git a/src/hume/empathic_voice/chat/socket_client.py b/src/hume/empathic_voice/chat/socket_client.py +index de3b4a5e..18ee74ab 100644 +--- a/src/hume/empathic_voice/chat/socket_client.py ++++ b/src/hume/empathic_voice/chat/socket_client.py +@@ -6,21 +6,10 @@ from json.decoder import JSONDecodeError + + import websockets + import websockets.sync.connection as websockets_sync_connection +-from typing_extensions import deprecated +-from contextlib import asynccontextmanager +- + from ...core.events import EventEmitterMixin, EventType + from ...core.pydantic_utilities import parse_obj_as +-from ..types.assistant_input import AssistantInput +-from ..types.audio_input import AudioInput +-from ..types.pause_assistant_message import PauseAssistantMessage +-from ..types.resume_assistant_message import ResumeAssistantMessage +-from ..types.session_settings import SessionSettings +-from ..types.tool_error_message import ToolErrorMessage +-from ..types.tool_response_message import ToolResponseMessage +-from ..types.user_input import UserInput +-from .types.publish_event import PublishEvent + from ..types.subscribe_event import SubscribeEvent ++from .types.publish_event import PublishEvent + + try: + from websockets.legacy.client import WebSocketClientProtocol # type: ignore +@@ -29,58 +18,6 @@ except ImportError: + + ChatSocketClientResponse = typing.Union[SubscribeEvent] + +-class ChatConnectSessionSettingsAudio(typing.TypedDict, total=False): +- channels: typing.Optional[int] +- encoding: typing.Optional[str] +- sample_rate: typing.Optional[int] +- +- +-class ChatConnectSessionSettingsContext(typing.TypedDict, total=False): +- text: typing.Optional[str] +- +- +-SessionSettingsVariablesValue = typing.Union[str, float, bool] +- +-class ChatConnectSessionSettings(typing.TypedDict, total=False): +- audio: typing.Optional[ChatConnectSessionSettingsAudio] +- context: typing.Optional[ChatConnectSessionSettingsContext] +- custom_session_id: typing.Optional[str] +- event_limit: typing.Optional[int] +- language_model_api_key: typing.Optional[str] +- system_prompt: typing.Optional[str] +- variables: typing.Optional[typing.Dict[str, SessionSettingsVariablesValue]] +- voice_id: typing.Optional[str] +- +-@deprecated("Use .connect() with kwargs instead.") +-class ChatConnectOptions(typing.TypedDict, total=False): +- config_id: typing.Optional[str] +- """ +- The ID of the configuration. +- """ +- +- config_version: typing.Optional[str] +- """ +- The version of the configuration. +- """ +- +- api_key: typing.Optional[str] +- +- secret_key: typing.Optional[str] +- +- resumed_chat_group_id: typing.Optional[str] +- +- verbose_transcription: typing.Optional[bool] +- +- """ +- ID of the Voice to use for this chat. If specified, will override the voice set in the Config +- """ +- voice_id: typing.Optional[str] +- +- session_settings: typing.Optional[typing.Dict] +- """ +- Session settings to apply at connection time. Supports all SessionSettings fields except +- builtin_tools, type, metadata, and tools. Additionally supports event_limit. +- """ + + class AsyncChatSocketClient(EventEmitterMixin): + def __init__(self, *, websocket: WebSocketClientProtocol): +@@ -141,38 +78,6 @@ class AsyncChatSocketClient(EventEmitterMixin): + """ + await self._send(data.dict()) + +- @deprecated("Use send_publish instead.") +- async def send_audio_input(self, message: AudioInput) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_session_settings(self, message: SessionSettings) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_user_input(self, message: UserInput) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_assistant_input(self, message: AssistantInput) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_tool_response(self, message: ToolResponseMessage) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_tool_error(self, message: ToolErrorMessage) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_pause_assistant(self, message: PauseAssistantMessage) -> None: +- await self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- async def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: +- await self.send_publish(message) +- + + class ChatSocketClient(EventEmitterMixin): + def __init__(self, *, websocket: websockets_sync_connection.Connection): +@@ -232,35 +137,3 @@ class ChatSocketClient(EventEmitterMixin): + Send a Pydantic model to the websocket connection. + """ + self._send(data.dict()) +- +- @deprecated("Use send_publish instead.") +- def send_audio_input(self, message: AudioInput) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_session_settings(self, message: SessionSettings) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_user_input(self, message: UserInput) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_assistant_input(self, message: AssistantInput) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_tool_response(self, message: ToolResponseMessage) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_tool_error(self, message: ToolErrorMessage) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_pause_assistant(self, message: PauseAssistantMessage) -> None: +- self.send_publish(message) +- +- @deprecated("Use send_publish instead.") +- def send_resume_assistant(self, message: ResumeAssistantMessage) -> None: +- self.send_publish(message) diff --git a/src/hume/empathic_voice/client.py.diff b/src/hume/empathic_voice/client.py.diff new file mode 100644 index 00000000..84b74be1 --- /dev/null +++ b/src/hume/empathic_voice/client.py.diff @@ -0,0 +1,201 @@ +diff --git a/src/hume/empathic_voice/client.py b/src/hume/empathic_voice/client.py +index e9119462..241410a1 100644 +--- a/src/hume/empathic_voice/client.py ++++ b/src/hume/empathic_voice/client.py +@@ -4,8 +4,6 @@ from __future__ import annotations + + import typing + +-from hume.empathic_voice.chat.client import AsyncChatClient, ChatClient +- + from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + from .raw_client import AsyncRawEmpathicVoiceClient, RawEmpathicVoiceClient + +@@ -13,6 +11,7 @@ if typing.TYPE_CHECKING: + from .chat_groups.client import AsyncChatGroupsClient, ChatGroupsClient + from .chats.client import AsyncChatsClient, ChatsClient + from .configs.client import AsyncConfigsClient, ConfigsClient ++ from .control_plane.client import AsyncControlPlaneClient, ControlPlaneClient + from .prompts.client import AsyncPromptsClient, PromptsClient + from .tools.client import AsyncToolsClient, ToolsClient + +@@ -21,12 +20,12 @@ class EmpathicVoiceClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawEmpathicVoiceClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper +- self._tools: typing.Optional[ToolsClient] = None +- self._prompts: typing.Optional[PromptsClient] = None +- self._configs: typing.Optional[ConfigsClient] = None +- self._chats: typing.Optional[ChatsClient] = None ++ self._control_plane: typing.Optional[ControlPlaneClient] = None + self._chat_groups: typing.Optional[ChatGroupsClient] = None +- self._chat: typing.Optional[ChatClient] = None ++ self._chats: typing.Optional[ChatsClient] = None ++ self._configs: typing.Optional[ConfigsClient] = None ++ self._prompts: typing.Optional[PromptsClient] = None ++ self._tools: typing.Optional[ToolsClient] = None + + @property + def with_raw_response(self) -> RawEmpathicVoiceClient: +@@ -40,20 +39,28 @@ class EmpathicVoiceClient: + return self._raw_client + + @property +- def tools(self): +- if self._tools is None: +- from .tools.client import ToolsClient # noqa: E402 ++ def control_plane(self): ++ if self._control_plane is None: ++ from .control_plane.client import ControlPlaneClient # noqa: E402 + +- self._tools = ToolsClient(client_wrapper=self._client_wrapper) +- return self._tools ++ self._control_plane = ControlPlaneClient(client_wrapper=self._client_wrapper) ++ return self._control_plane + + @property +- def prompts(self): +- if self._prompts is None: +- from .prompts.client import PromptsClient # noqa: E402 ++ def chat_groups(self): ++ if self._chat_groups is None: ++ from .chat_groups.client import ChatGroupsClient # noqa: E402 + +- self._prompts = PromptsClient(client_wrapper=self._client_wrapper) +- return self._prompts ++ self._chat_groups = ChatGroupsClient(client_wrapper=self._client_wrapper) ++ return self._chat_groups ++ ++ @property ++ def chats(self): ++ if self._chats is None: ++ from .chats.client import ChatsClient # noqa: E402 ++ ++ self._chats = ChatsClient(client_wrapper=self._client_wrapper) ++ return self._chats + + @property + def configs(self): +@@ -64,32 +71,32 @@ class EmpathicVoiceClient: + return self._configs + + @property +- def chats(self): +- if self._chats is None: +- from .chats.client import ChatsClient # noqa: E402 ++ def prompts(self): ++ if self._prompts is None: ++ from .prompts.client import PromptsClient # noqa: E402 + +- self._chats = ChatsClient(client_wrapper=self._client_wrapper) +- return self._chats ++ self._prompts = PromptsClient(client_wrapper=self._client_wrapper) ++ return self._prompts + + @property +- def chat_groups(self): +- if self._chat_groups is None: +- from .chat_groups.client import ChatGroupsClient # noqa: E402 ++ def tools(self): ++ if self._tools is None: ++ from .tools.client import ToolsClient # noqa: E402 + +- self._chat_groups = ChatGroupsClient(client_wrapper=self._client_wrapper) +- return self._chat_groups ++ self._tools = ToolsClient(client_wrapper=self._client_wrapper) ++ return self._tools + + + class AsyncEmpathicVoiceClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawEmpathicVoiceClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper +- self._tools: typing.Optional[AsyncToolsClient] = None +- self._prompts: typing.Optional[AsyncPromptsClient] = None +- self._configs: typing.Optional[AsyncConfigsClient] = None +- self._chats: typing.Optional[AsyncChatsClient] = None ++ self._control_plane: typing.Optional[AsyncControlPlaneClient] = None + self._chat_groups: typing.Optional[AsyncChatGroupsClient] = None +- self._chat: typing.Optional[AsyncChatClient] = None ++ self._chats: typing.Optional[AsyncChatsClient] = None ++ self._configs: typing.Optional[AsyncConfigsClient] = None ++ self._prompts: typing.Optional[AsyncPromptsClient] = None ++ self._tools: typing.Optional[AsyncToolsClient] = None + + @property + def with_raw_response(self) -> AsyncRawEmpathicVoiceClient: +@@ -103,28 +110,20 @@ class AsyncEmpathicVoiceClient: + return self._raw_client + + @property +- def tools(self): +- if self._tools is None: +- from .tools.client import AsyncToolsClient # noqa: E402 ++ def control_plane(self): ++ if self._control_plane is None: ++ from .control_plane.client import AsyncControlPlaneClient # noqa: E402 + +- self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) +- return self._tools ++ self._control_plane = AsyncControlPlaneClient(client_wrapper=self._client_wrapper) ++ return self._control_plane + + @property +- def prompts(self): +- if self._prompts is None: +- from .prompts.client import AsyncPromptsClient # noqa: E402 +- +- self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) +- return self._prompts +- +- @property +- def configs(self): +- if self._configs is None: +- from .configs.client import AsyncConfigsClient # noqa: E402 ++ def chat_groups(self): ++ if self._chat_groups is None: ++ from .chat_groups.client import AsyncChatGroupsClient # noqa: E402 + +- self._configs = AsyncConfigsClient(client_wrapper=self._client_wrapper) +- return self._configs ++ self._chat_groups = AsyncChatGroupsClient(client_wrapper=self._client_wrapper) ++ return self._chat_groups + + @property + def chats(self): +@@ -135,17 +134,25 @@ class AsyncEmpathicVoiceClient: + return self._chats + + @property +- def chat_groups(self): +- if self._chat_groups is None: +- from .chat_groups.client import AsyncChatGroupsClient # noqa: E402 ++ def configs(self): ++ if self._configs is None: ++ from .configs.client import AsyncConfigsClient # noqa: E402 + +- self._chat_groups = AsyncChatGroupsClient(client_wrapper=self._client_wrapper) +- return self._chat_groups ++ self._configs = AsyncConfigsClient(client_wrapper=self._client_wrapper) ++ return self._configs + + @property +- def chat(self): +- if self._chat is None: +- from .chat.client import AsyncChatClient # noqa: E402 ++ def prompts(self): ++ if self._prompts is None: ++ from .prompts.client import AsyncPromptsClient # noqa: E402 + +- self._chat = AsyncChatClient(client_wrapper=self._client_wrapper) +- return self._chat ++ self._prompts = AsyncPromptsClient(client_wrapper=self._client_wrapper) ++ return self._prompts ++ ++ @property ++ def tools(self): ++ if self._tools is None: ++ from .tools.client import AsyncToolsClient # noqa: E402 ++ ++ self._tools = AsyncToolsClient(client_wrapper=self._client_wrapper) ++ return self._tools diff --git a/src/hume/expression_measurement/batch/types/inference_job.py.diff b/src/hume/expression_measurement/batch/types/inference_job.py.diff new file mode 100644 index 00000000..f2e72b13 --- /dev/null +++ b/src/hume/expression_measurement/batch/types/inference_job.py.diff @@ -0,0 +1,24 @@ +diff --git a/src/hume/expression_measurement/batch/types/inference_job.py b/src/hume/expression_measurement/batch/types/inference_job.py +index 08add412..83a68f84 100644 +--- a/src/hume/expression_measurement/batch/types/inference_job.py ++++ b/src/hume/expression_measurement/batch/types/inference_job.py +@@ -1,7 +1,6 @@ + # This file was auto-generated by Fern from our API Definition. + + import typing +-from typing_extensions import deprecated + + import pydantic + from ....core.pydantic_utilities import IS_PYDANTIC_V2 +@@ -16,11 +15,6 @@ class InferenceJob(JobInference): + Jobs created with the Expression Measurement API will have this field set to `INFERENCE`. + """ + +- @property +- @deprecated("Use .state.status instead") +- def status(self) -> str: +- return self.state.status +- + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: diff --git a/src/hume/expression_measurement/client.py.diff b/src/hume/expression_measurement/client.py.diff new file mode 100644 index 00000000..612621be --- /dev/null +++ b/src/hume/expression_measurement/client.py.diff @@ -0,0 +1,70 @@ +diff --git a/src/hume/expression_measurement/client.py b/src/hume/expression_measurement/client.py +index f75d9210..a7651e40 100644 +--- a/src/hume/expression_measurement/client.py ++++ b/src/hume/expression_measurement/client.py +@@ -8,16 +8,14 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + from .raw_client import AsyncRawExpressionMeasurementClient, RawExpressionMeasurementClient + + if typing.TYPE_CHECKING: +- from .batch.client_with_utils import AsyncBatchClientWithUtils, BatchClientWithUtils +- from .stream.stream.client import StreamClient, AsyncStreamClient ++ from .batch.client import AsyncBatchClient, BatchClient + + + class ExpressionMeasurementClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawExpressionMeasurementClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper +- self._batch: typing.Optional[BatchClientWithUtils] = None +- self._stream: typing.Optional[StreamClient] = None ++ self._batch: typing.Optional[BatchClient] = None + + @property + def with_raw_response(self) -> RawExpressionMeasurementClient: +@@ -33,25 +31,17 @@ class ExpressionMeasurementClient: + @property + def batch(self): + if self._batch is None: +- from .batch.client_with_utils import BatchClientWithUtils # noqa: E402 ++ from .batch.client import BatchClient # noqa: E402 + +- self._batch = BatchClientWithUtils(client_wrapper=self._client_wrapper) ++ self._batch = BatchClient(client_wrapper=self._client_wrapper) + return self._batch + +- @property +- def stream(self): +- if self._stream is None: +- from .stream.stream.client import StreamClient # noqa: E402 +- self._stream = StreamClient(client_wrapper=self._client_wrapper) +- return self._stream +- + + class AsyncExpressionMeasurementClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawExpressionMeasurementClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper +- self._batch: typing.Optional[AsyncBatchClientWithUtils] = None +- self._stream: typing.Optional[AsyncStreamClient] = None ++ self._batch: typing.Optional[AsyncBatchClient] = None + + @property + def with_raw_response(self) -> AsyncRawExpressionMeasurementClient: +@@ -67,15 +57,7 @@ class AsyncExpressionMeasurementClient: + @property + def batch(self): + if self._batch is None: +- from .batch.client_with_utils import AsyncBatchClientWithUtils # noqa: E402 ++ from .batch.client import AsyncBatchClient # noqa: E402 + +- self._batch = AsyncBatchClientWithUtils(client_wrapper=self._client_wrapper) ++ self._batch = AsyncBatchClient(client_wrapper=self._client_wrapper) + return self._batch +- +- @property +- def stream(self): +- if self._stream is None: +- from .stream.stream.client import AsyncStreamClient # noqa: E402 +- +- self._stream = AsyncStreamClient(client_wrapper=self._client_wrapper) +- return self._stream diff --git a/src/hume/expression_measurement/stream/stream/socket_client.py.diff b/src/hume/expression_measurement/stream/stream/socket_client.py.diff new file mode 100644 index 00000000..ac65dfb4 --- /dev/null +++ b/src/hume/expression_measurement/stream/stream/socket_client.py.diff @@ -0,0 +1,170 @@ +diff --git a/src/hume/expression_measurement/stream/stream/socket_client.py b/src/hume/expression_measurement/stream/stream/socket_client.py +index fcd83929..85935e4e 100644 +--- a/src/hume/expression_measurement/stream/stream/socket_client.py ++++ b/src/hume/expression_measurement/stream/stream/socket_client.py +@@ -1,18 +1,13 @@ + # This file was auto-generated by Fern from our API Definition. + +-import base64 + import json + import typing + from json.decoder import JSONDecodeError +-from pathlib import Path + + import websockets + import websockets.sync.connection as websockets_sync_connection +- +-from ....core.api_error import ApiError + from ....core.events import EventEmitterMixin, EventType + from ....core.pydantic_utilities import parse_obj_as +-from .types.config import Config + from .types.stream_models_endpoint_payload import StreamModelsEndpointPayload + from .types.subscribe_event import SubscribeEvent + +@@ -83,74 +78,6 @@ class AsyncStreamSocketClient(EventEmitterMixin): + """ + await self._send(data.dict()) + +- async def send_facemesh( +- self, +- landmarks: typing.List[typing.List[typing.List[float]]], +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- landmarks_str = json.dumps(landmarks) +- payload = { +- "data": landmarks_str, +- "models": config.dict() if config else None, +- "raw_text": False, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- await self._websocket.send(json.dumps(payload)) +- return await self.recv() +- +- async def send_text( +- self, +- text: str, +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- payload = { +- "data": text, +- "models": config.dict() if config else None, +- "raw_text": True, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- await self._websocket.send(json.dumps(payload)) +- return await self.recv() +- +- async def send_file( +- self, +- file_: typing.Union[str, Path], +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- try: +- with open(file_, "rb") as f: +- bytes_data = base64.b64encode(f.read()).decode() +- except: +- if isinstance(file_, Path): +- raise ApiError(body=f"Failed to open file: {file_}") +- # If you cannot open the file, assume you were passed a b64 string, not a file path +- bytes_data = str(file_) +- +- payload = { +- "data": bytes_data, +- "models": config.dict() if config else None, +- "raw_text": False, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- await self._websocket.send(json.dumps(payload)) +- return await self.recv() +- +- async def get_job_details(self) -> StreamSocketClientResponse: +- payload = {"job_details": True} +- await self._websocket.send(json.dumps(payload)) +- return await self.recv() +- +- async def reset(self) -> StreamSocketClientResponse: +- payload = {"reset_stream": True} +- await self._websocket.send(json.dumps(payload)) +- return await self.recv() +- + + class StreamSocketClient(EventEmitterMixin): + def __init__(self, *, websocket: websockets_sync_connection.Connection): +@@ -210,71 +137,3 @@ class StreamSocketClient(EventEmitterMixin): + Send a Pydantic model to the websocket connection. + """ + self._send(data.dict()) +- +- def send_facemesh( +- self, +- landmarks: typing.List[typing.List[typing.List[float]]], +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- landmarks_str = json.dumps(landmarks) +- payload = { +- "data": landmarks_str, +- "models": config.dict() if config else None, +- "raw_text": False, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- self._websocket.send(json.dumps(payload)) +- return self.recv() +- +- def send_text( +- self, +- text: str, +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- payload = { +- "data": text, +- "models": config.dict() if config else None, +- "raw_text": True, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- self._websocket.send(json.dumps(payload)) +- return self.recv() +- +- def send_file( +- self, +- file_: typing.Union[str, Path], +- config: typing.Optional[Config] = None, +- payload_id: typing.Optional[str] = None, +- ) -> StreamSocketClientResponse: +- try: +- with open(file_, "rb") as f: +- bytes_data = base64.b64encode(f.read()).decode() +- except: +- if isinstance(file_, Path): +- raise ApiError(body=f"Failed to open file: {file_}") +- # If you cannot open the file, assume you were passed a b64 string, not a file path +- bytes_data = str(file_) +- +- payload = { +- "data": bytes_data, +- "models": config.dict() if config else None, +- "raw_text": False, +- "payload_id": payload_id, +- } +- payload = {k: v for k, v in payload.items() if v is not None} +- self._websocket.send(json.dumps(payload)) +- return self.recv() +- +- def get_job_details(self) -> StreamSocketClientResponse: +- payload = {"job_details": True} +- self._websocket.send(json.dumps(payload)) +- return self.recv() +- +- def reset(self) -> StreamSocketClientResponse: +- payload = {"reset_stream": True} +- self._websocket.send(json.dumps(payload)) +- return self.recv() diff --git a/src/hume/tts/client.py.diff b/src/hume/tts/client.py.diff new file mode 100644 index 00000000..ea61a075 --- /dev/null +++ b/src/hume/tts/client.py.diff @@ -0,0 +1,438 @@ +diff --git a/src/hume/tts/client.py b/src/hume/tts/client.py +index 5f6c2c70..7c5e8597 100644 +--- a/src/hume/tts/client.py ++++ b/src/hume/tts/client.py +@@ -4,8 +4,7 @@ from __future__ import annotations + + import typing + +-from hume.tts.stream_input.client import StreamInputClient +- ++from .. import core + from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper + from ..core.request_options import RequestOptions + from .raw_client import AsyncRawTtsClient, RawTtsClient +@@ -13,13 +12,13 @@ from .types.format import Format + from .types.octave_version import OctaveVersion + from .types.posted_context import PostedContext + from .types.posted_utterance import PostedUtterance ++from .types.posted_utterance_voice import PostedUtteranceVoice + from .types.return_tts import ReturnTts + from .types.timestamp_type import TimestampType + from .types.tts_output import TtsOutput + + if typing.TYPE_CHECKING: + from .voices.client import AsyncVoicesClient, VoicesClient +- from .stream_input.client import AsyncStreamInputClient, StreamInputClient + # this is used as the default value for optional parameters + OMIT = typing.cast(typing.Any, ...) + +@@ -29,7 +28,6 @@ class TtsClient: + self._raw_client = RawTtsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._voices: typing.Optional[VoicesClient] = None +- self._stream_input: typing.Optional[StreamInputClient] = None + + @property + def with_raw_response(self) -> RawTtsClient: +@@ -75,10 +73,12 @@ class TtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -187,10 +187,12 @@ class TtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -292,10 +294,12 @@ class TtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -397,10 +401,12 @@ class TtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -471,6 +477,117 @@ class TtsClient: + ) as r: + yield from r.data + ++ def convert_voice_file( ++ self, ++ *, ++ audio: core.File, ++ strip_headers: typing.Optional[bool] = OMIT, ++ context: typing.Optional[PostedContext] = OMIT, ++ voice: typing.Optional[PostedUtteranceVoice] = OMIT, ++ format: typing.Optional[Format] = OMIT, ++ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, ++ request_options: typing.Optional[RequestOptions] = None, ++ ) -> typing.Iterator[bytes]: ++ """ ++ Parameters ++ ---------- ++ audio : core.File ++ See core.File for more documentation ++ ++ strip_headers : typing.Optional[bool] ++ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). ++ ++ context : typing.Optional[PostedContext] ++ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. ++ ++ voice : typing.Optional[PostedUtteranceVoice] ++ ++ format : typing.Optional[Format] ++ Specifies the output audio file format. ++ ++ include_timestamp_types : typing.Optional[typing.List[TimestampType]] ++ The set of timestamp types to include in the response. ++ ++ request_options : typing.Optional[RequestOptions] ++ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. ++ ++ Returns ++ ------- ++ typing.Iterator[bytes] ++ Successful Response ++ """ ++ with self._raw_client.convert_voice_file( ++ audio=audio, ++ strip_headers=strip_headers, ++ context=context, ++ voice=voice, ++ format=format, ++ include_timestamp_types=include_timestamp_types, ++ request_options=request_options, ++ ) as r: ++ yield from r.data ++ ++ def convert_voice_json( ++ self, ++ *, ++ strip_headers: typing.Optional[bool] = OMIT, ++ audio: typing.Optional[core.File] = OMIT, ++ context: typing.Optional[PostedContext] = OMIT, ++ voice: typing.Optional[PostedUtteranceVoice] = OMIT, ++ format: typing.Optional[Format] = OMIT, ++ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, ++ request_options: typing.Optional[RequestOptions] = None, ++ ) -> typing.Iterator[TtsOutput]: ++ """ ++ Parameters ++ ---------- ++ strip_headers : typing.Optional[bool] ++ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). ++ ++ audio : typing.Optional[core.File] ++ See core.File for more documentation ++ ++ context : typing.Optional[PostedContext] ++ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. ++ ++ voice : typing.Optional[PostedUtteranceVoice] ++ ++ format : typing.Optional[Format] ++ Specifies the output audio file format. ++ ++ include_timestamp_types : typing.Optional[typing.List[TimestampType]] ++ The set of timestamp types to include in the response. ++ ++ request_options : typing.Optional[RequestOptions] ++ Request-specific configuration. ++ ++ Yields ++ ------ ++ typing.Iterator[TtsOutput] ++ Successful Response ++ ++ Examples ++ -------- ++ from hume import HumeClient ++ ++ client = HumeClient( ++ api_key="YOUR_API_KEY", ++ ) ++ response = client.tts.convert_voice_json() ++ for chunk in response: ++ yield chunk ++ """ ++ with self._raw_client.convert_voice_json( ++ strip_headers=strip_headers, ++ audio=audio, ++ context=context, ++ voice=voice, ++ format=format, ++ include_timestamp_types=include_timestamp_types, ++ request_options=request_options, ++ ) as r: ++ yield from r.data ++ + @property + def voices(self): + if self._voices is None: +@@ -479,20 +596,12 @@ class TtsClient: + self._voices = VoicesClient(client_wrapper=self._client_wrapper) + return self._voices + +- @property +- def stream_input(self): +- if self._stream_input is None: +- from .stream_input.client import StreamInputClient # noqa: E402 +- self._stream_input = StreamInputClient(client_wrapper=self._client_wrapper) +- return self._stream_input +- + + class AsyncTtsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawTtsClient(client_wrapper=client_wrapper) + self._client_wrapper = client_wrapper + self._voices: typing.Optional[AsyncVoicesClient] = None +- self._stream_input: typing.Optional[AsyncStreamInputClient] = None + + @property + def with_raw_response(self) -> AsyncRawTtsClient: +@@ -538,10 +647,12 @@ class AsyncTtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -658,10 +769,12 @@ class AsyncTtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -772,10 +885,12 @@ class AsyncTtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -886,10 +1001,12 @@ class AsyncTtsClient: + Specifies the output audio file format. + + include_timestamp_types : typing.Optional[typing.Sequence[TimestampType]] +- The set of timestamp types to include in the response. ++ The set of timestamp types to include in the response. Only supported for Octave 2 requests. + + num_generations : typing.Optional[int] +- Number of generations of the audio to produce. ++ Number of audio generations to produce from the input utterances. ++ ++ Using `num_generations` enables faster processing than issuing multiple sequential requests. Additionally, specifying `num_generations` allows prosody continuation across all generations without repeating context, ensuring each generation sounds slightly different while maintaining contextual consistency. + + split_utterances : typing.Optional[bool] + Controls how audio output is segmented in the response. +@@ -969,6 +1086,127 @@ class AsyncTtsClient: + async for _chunk in r.data: + yield _chunk + ++ async def convert_voice_file( ++ self, ++ *, ++ audio: core.File, ++ strip_headers: typing.Optional[bool] = OMIT, ++ context: typing.Optional[PostedContext] = OMIT, ++ voice: typing.Optional[PostedUtteranceVoice] = OMIT, ++ format: typing.Optional[Format] = OMIT, ++ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, ++ request_options: typing.Optional[RequestOptions] = None, ++ ) -> typing.AsyncIterator[bytes]: ++ """ ++ Parameters ++ ---------- ++ audio : core.File ++ See core.File for more documentation ++ ++ strip_headers : typing.Optional[bool] ++ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). ++ ++ context : typing.Optional[PostedContext] ++ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. ++ ++ voice : typing.Optional[PostedUtteranceVoice] ++ ++ format : typing.Optional[Format] ++ Specifies the output audio file format. ++ ++ include_timestamp_types : typing.Optional[typing.List[TimestampType]] ++ The set of timestamp types to include in the response. ++ ++ request_options : typing.Optional[RequestOptions] ++ Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. ++ ++ Returns ++ ------- ++ typing.AsyncIterator[bytes] ++ Successful Response ++ """ ++ async with self._raw_client.convert_voice_file( ++ audio=audio, ++ strip_headers=strip_headers, ++ context=context, ++ voice=voice, ++ format=format, ++ include_timestamp_types=include_timestamp_types, ++ request_options=request_options, ++ ) as r: ++ async for _chunk in r.data: ++ yield _chunk ++ ++ async def convert_voice_json( ++ self, ++ *, ++ strip_headers: typing.Optional[bool] = OMIT, ++ audio: typing.Optional[core.File] = OMIT, ++ context: typing.Optional[PostedContext] = OMIT, ++ voice: typing.Optional[PostedUtteranceVoice] = OMIT, ++ format: typing.Optional[Format] = OMIT, ++ include_timestamp_types: typing.Optional[typing.List[TimestampType]] = OMIT, ++ request_options: typing.Optional[RequestOptions] = None, ++ ) -> typing.AsyncIterator[TtsOutput]: ++ """ ++ Parameters ++ ---------- ++ strip_headers : typing.Optional[bool] ++ If enabled, the audio for all the chunks of a generation, once concatenated together, will constitute a single audio file. Otherwise, if disabled, each chunk's audio will be its own audio file, each with its own headers (if applicable). ++ ++ audio : typing.Optional[core.File] ++ See core.File for more documentation ++ ++ context : typing.Optional[PostedContext] ++ Utterances to use as context for generating consistent speech style and prosody across multiple requests. These will not be converted to speech output. ++ ++ voice : typing.Optional[PostedUtteranceVoice] ++ ++ format : typing.Optional[Format] ++ Specifies the output audio file format. ++ ++ include_timestamp_types : typing.Optional[typing.List[TimestampType]] ++ The set of timestamp types to include in the response. ++ ++ request_options : typing.Optional[RequestOptions] ++ Request-specific configuration. ++ ++ Yields ++ ------ ++ typing.AsyncIterator[TtsOutput] ++ Successful Response ++ ++ Examples ++ -------- ++ import asyncio ++ ++ from hume import AsyncHumeClient ++ ++ client = AsyncHumeClient( ++ api_key="YOUR_API_KEY", ++ ) ++ ++ ++ async def main() -> None: ++ response = await client.tts.convert_voice_json() ++ async for chunk in response: ++ yield chunk ++ ++ ++ asyncio.run(main()) ++ """ ++ async with self._raw_client.convert_voice_json( ++ strip_headers=strip_headers, ++ audio=audio, ++ context=context, ++ voice=voice, ++ format=format, ++ include_timestamp_types=include_timestamp_types, ++ request_options=request_options, ++ ) as r: ++ async for _chunk in r.data: ++ yield _chunk ++ + @property + def voices(self): + if self._voices is None: +@@ -976,13 +1214,3 @@ class AsyncTtsClient: + + self._voices = AsyncVoicesClient(client_wrapper=self._client_wrapper) + return self._voices +- +- @property +- def stream_input(self): +- if self._stream_input is None: +- from .stream_input.client import AsyncStreamInputClient +- +- self._stream_input = AsyncStreamInputClient( +- client_wrapper=self._client_wrapper, +- ) +- return self._stream_input From daf2f2c7f071534e3570d6d1d3d71e0dd52455d6 Mon Sep 17 00:00:00 2001 From: twitchard Date: Fri, 21 Nov 2025 09:40:31 -0600 Subject: [PATCH 3/5] websocket dep --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9507520a..62bb52e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ pydantic = ">= 1.9.2" pydantic-core = ">=2.18.2" sounddevice = { version = "^0.4.6", optional = true} typing_extensions = ">= 4.0.0" -websockets = ">=12.0" +websockets = "^13.1" [tool.poetry.group.dev.dependencies] mypy = "==1.13.0" From 6f35ea82e55c9a604e4a76c1d0bc78cfa4c046c2 Mon Sep 17 00:00:00 2001 From: twitchard Date: Fri, 21 Nov 2025 09:57:01 -0600 Subject: [PATCH 4/5] Fix missing base_url --- src/hume/expression_measurement/batch/client_with_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hume/expression_measurement/batch/client_with_utils.py b/src/hume/expression_measurement/batch/client_with_utils.py index 452f5a12..f3915a6a 100644 --- a/src/hume/expression_measurement/batch/client_with_utils.py +++ b/src/hume/expression_measurement/batch/client_with_utils.py @@ -98,6 +98,7 @@ def start_inference_job_from_local_file( _response = self._raw_client._client_wrapper.httpx_client.request( "v0/batch/jobs", + base_url=self._raw_client._client_wrapper.get_environment().base, method="POST", files=files, request_options=request_options, @@ -203,6 +204,7 @@ async def start_inference_job_from_local_file( _response = await self._raw_client._client_wrapper.httpx_client.request( "v0/batch/jobs", + base_url=self._raw_client._client_wrapper.get_environment().base, method="POST", files=files, request_options=request_options, From 9349b4166321cce6f68f5b7e69d7dee4bc1986df Mon Sep 17 00:00:00 2001 From: twitchard Date: Fri, 21 Nov 2025 09:59:06 -0600 Subject: [PATCH 5/5] update lock file --- poetry.lock | 163 +++++++++++++++++++++++++++++----------------------- 1 file changed, 90 insertions(+), 73 deletions(-) diff --git a/poetry.lock b/poetry.lock index ef9f0876..c29f926d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiofiles" @@ -3220,80 +3220,97 @@ test = ["pytest", "websockets"] [[package]] name = "websockets" -version = "15.0.1" +version = "13.1" description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" optional = false -python-versions = ">=3.9" +python-versions = ">=3.8" files = [ - {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d63efaa0cd96cf0c5fe4d581521d9fa87744540d4bc999ae6e08595a1014b45b"}, - {file = "websockets-15.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ac60e3b188ec7574cb761b08d50fcedf9d77f1530352db4eef1707fe9dee7205"}, - {file = "websockets-15.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5756779642579d902eed757b21b0164cd6fe338506a8083eb58af5c372e39d9a"}, - {file = "websockets-15.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fdfe3e2a29e4db3659dbd5bbf04560cea53dd9610273917799f1cde46aa725e"}, - {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c2529b320eb9e35af0fa3016c187dffb84a3ecc572bcee7c3ce302bfeba52bf"}, - {file = "websockets-15.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac1e5c9054fe23226fb11e05a6e630837f074174c4c2f0fe442996112a6de4fb"}, - {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5df592cd503496351d6dc14f7cdad49f268d8e618f80dce0cd5a36b93c3fc08d"}, - {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0a34631031a8f05657e8e90903e656959234f3a04552259458aac0b0f9ae6fd9"}, - {file = "websockets-15.0.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3d00075aa65772e7ce9e990cab3ff1de702aa09be3940d1dc88d5abf1ab8a09c"}, - {file = "websockets-15.0.1-cp310-cp310-win32.whl", hash = "sha256:1234d4ef35db82f5446dca8e35a7da7964d02c127b095e172e54397fb6a6c256"}, - {file = "websockets-15.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:39c1fec2c11dc8d89bba6b2bf1556af381611a173ac2b511cf7231622058af41"}, - {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:823c248b690b2fd9303ba00c4f66cd5e2d8c3ba4aa968b2779be9532a4dad431"}, - {file = "websockets-15.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678999709e68425ae2593acf2e3ebcbcf2e69885a5ee78f9eb80e6e371f1bf57"}, - {file = "websockets-15.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d50fd1ee42388dcfb2b3676132c78116490976f1300da28eb629272d5d93e905"}, - {file = "websockets-15.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d99e5546bf73dbad5bf3547174cd6cb8ba7273062a23808ffea025ecb1cf8562"}, - {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:66dd88c918e3287efc22409d426c8f729688d89a0c587c88971a0faa2c2f3792"}, - {file = "websockets-15.0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8dd8327c795b3e3f219760fa603dcae1dcc148172290a8ab15158cf85a953413"}, - {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8fdc51055e6ff4adeb88d58a11042ec9a5eae317a0a53d12c062c8a8865909e8"}, - {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:693f0192126df6c2327cce3baa7c06f2a117575e32ab2308f7f8216c29d9e2e3"}, - {file = "websockets-15.0.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:54479983bd5fb469c38f2f5c7e3a24f9a4e70594cd68cd1fa6b9340dadaff7cf"}, - {file = "websockets-15.0.1-cp311-cp311-win32.whl", hash = "sha256:16b6c1b3e57799b9d38427dda63edcbe4926352c47cf88588c0be4ace18dac85"}, - {file = "websockets-15.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:27ccee0071a0e75d22cb35849b1db43f2ecd3e161041ac1ee9d2352ddf72f065"}, - {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:3e90baa811a5d73f3ca0bcbf32064d663ed81318ab225ee4f427ad4e26e5aff3"}, - {file = "websockets-15.0.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:592f1a9fe869c778694f0aa806ba0374e97648ab57936f092fd9d87f8bc03665"}, - {file = "websockets-15.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0701bc3cfcb9164d04a14b149fd74be7347a530ad3bbf15ab2c678a2cd3dd9a2"}, - {file = "websockets-15.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e8b56bdcdb4505c8078cb6c7157d9811a85790f2f2b3632c7d1462ab5783d215"}, - {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0af68c55afbd5f07986df82831c7bff04846928ea8d1fd7f30052638788bc9b5"}, - {file = "websockets-15.0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:64dee438fed052b52e4f98f76c5790513235efaa1ef7f3f2192c392cd7c91b65"}, - {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:d5f6b181bb38171a8ad1d6aa58a67a6aa9d4b38d0f8c5f496b9e42561dfc62fe"}, - {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:5d54b09eba2bada6011aea5375542a157637b91029687eb4fdb2dab11059c1b4"}, - {file = "websockets-15.0.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3be571a8b5afed347da347bfcf27ba12b069d9d7f42cb8c7028b5e98bbb12597"}, - {file = "websockets-15.0.1-cp312-cp312-win32.whl", hash = "sha256:c338ffa0520bdb12fbc527265235639fb76e7bc7faafbb93f6ba80d9c06578a9"}, - {file = "websockets-15.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:fcd5cf9e305d7b8338754470cf69cf81f420459dbae8a3b40cee57417f4614a7"}, - {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ee443ef070bb3b6ed74514f5efaa37a252af57c90eb33b956d35c8e9c10a1931"}, - {file = "websockets-15.0.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5a939de6b7b4e18ca683218320fc67ea886038265fd1ed30173f5ce3f8e85675"}, - {file = "websockets-15.0.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:746ee8dba912cd6fc889a8147168991d50ed70447bf18bcda7039f7d2e3d9151"}, - {file = "websockets-15.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:595b6c3969023ecf9041b2936ac3827e4623bfa3ccf007575f04c5a6aa318c22"}, - {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3c714d2fc58b5ca3e285461a4cc0c9a66bd0e24c5da9911e30158286c9b5be7f"}, - {file = "websockets-15.0.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0f3c1e2ab208db911594ae5b4f79addeb3501604a165019dd221c0bdcabe4db8"}, - {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:229cf1d3ca6c1804400b0a9790dc66528e08a6a1feec0d5040e8b9eb14422375"}, - {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:756c56e867a90fb00177d530dca4b097dd753cde348448a1012ed6c5131f8b7d"}, - {file = "websockets-15.0.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:558d023b3df0bffe50a04e710bc87742de35060580a293c2a984299ed83bc4e4"}, - {file = "websockets-15.0.1-cp313-cp313-win32.whl", hash = "sha256:ba9e56e8ceeeedb2e080147ba85ffcd5cd0711b89576b83784d8605a7df455fa"}, - {file = "websockets-15.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:e09473f095a819042ecb2ab9465aee615bd9c2028e4ef7d933600a8401c79561"}, - {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:5f4c04ead5aed67c8a1a20491d54cdfba5884507a48dd798ecaf13c74c4489f5"}, - {file = "websockets-15.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:abdc0c6c8c648b4805c5eacd131910d2a7f6455dfd3becab248ef108e89ab16a"}, - {file = "websockets-15.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a625e06551975f4b7ea7102bc43895b90742746797e2e14b70ed61c43a90f09b"}, - {file = "websockets-15.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d591f8de75824cbb7acad4e05d2d710484f15f29d4a915092675ad3456f11770"}, - {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:47819cea040f31d670cc8d324bb6435c6f133b8c7a19ec3d61634e62f8d8f9eb"}, - {file = "websockets-15.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ac017dd64572e5c3bd01939121e4d16cf30e5d7e110a119399cf3133b63ad054"}, - {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:4a9fac8e469d04ce6c25bb2610dc535235bd4aa14996b4e6dbebf5e007eba5ee"}, - {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:363c6f671b761efcb30608d24925a382497c12c506b51661883c3e22337265ed"}, - {file = "websockets-15.0.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:2034693ad3097d5355bfdacfffcbd3ef5694f9718ab7f29c29689a9eae841880"}, - {file = "websockets-15.0.1-cp39-cp39-win32.whl", hash = "sha256:3b1ac0d3e594bf121308112697cf4b32be538fb1444468fb0a6ae4feebc83411"}, - {file = "websockets-15.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7643a03db5c95c799b89b31c036d5f27eeb4d259c798e878d6937d71832b1e4"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0c9e74d766f2818bb95f84c25be4dea09841ac0f734d1966f415e4edfc4ef1c3"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1009ee0c7739c08a0cd59de430d6de452a55e42d6b522de7aa15e6f67db0b8e1"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76d1f20b1c7a2fa82367e04982e708723ba0e7b8d43aa643d3dcd404d74f1475"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f29d80eb9a9263b8d109135351caf568cc3f80b9928bccde535c235de55c22d9"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b359ed09954d7c18bbc1680f380c7301f92c60bf924171629c5db97febb12f04"}, - {file = "websockets-15.0.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:cad21560da69f4ce7658ca2cb83138fb4cf695a2ba3e475e0559e05991aa8122"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:7f493881579c90fc262d9cdbaa05a6b54b3811c2f300766748db79f098db9940"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:47b099e1f4fbc95b701b6e85768e1fcdaf1630f3cbe4765fa216596f12310e2e"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67f2b6de947f8c757db2db9c71527933ad0019737ec374a8a6be9a956786aaf9"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d08eb4c2b7d6c41da6ca0600c077e93f5adcfd979cd777d747e9ee624556da4b"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b826973a4a2ae47ba357e4e82fa44a463b8f168e1ca775ac64521442b19e87f"}, - {file = "websockets-15.0.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:21c1fa28a6a7e3cbdc171c694398b6df4744613ce9b36b1a498e816787e28123"}, - {file = "websockets-15.0.1-py3-none-any.whl", hash = "sha256:f7a866fbc1e97b5c617ee4116daaa09b722101d4a3c170c787450ba409f9736f"}, - {file = "websockets-15.0.1.tar.gz", hash = "sha256:82544de02076bafba038ce055ee6412d68da13ab47f0c60cab827346de828dee"}, + {file = "websockets-13.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f48c749857f8fb598fb890a75f540e3221d0976ed0bf879cf3c7eef34151acee"}, + {file = "websockets-13.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c7e72ce6bda6fb9409cc1e8164dd41d7c91466fb599eb047cfda72fe758a34a7"}, + {file = "websockets-13.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f779498eeec470295a2b1a5d97aa1bc9814ecd25e1eb637bd9d1c73a327387f6"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4676df3fe46956fbb0437d8800cd5f2b6d41143b6e7e842e60554398432cf29b"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7affedeb43a70351bb811dadf49493c9cfd1ed94c9c70095fd177e9cc1541fa"}, + {file = "websockets-13.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1971e62d2caa443e57588e1d82d15f663b29ff9dfe7446d9964a4b6f12c1e700"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5f2e75431f8dc4a47f31565a6e1355fb4f2ecaa99d6b89737527ea917066e26c"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:58cf7e75dbf7e566088b07e36ea2e3e2bd5676e22216e4cad108d4df4a7402a0"}, + {file = "websockets-13.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c90d6dec6be2c7d03378a574de87af9b1efea77d0c52a8301dd831ece938452f"}, + {file = "websockets-13.1-cp310-cp310-win32.whl", hash = "sha256:730f42125ccb14602f455155084f978bd9e8e57e89b569b4d7f0f0c17a448ffe"}, + {file = "websockets-13.1-cp310-cp310-win_amd64.whl", hash = "sha256:5993260f483d05a9737073be197371940c01b257cc45ae3f1d5d7adb371b266a"}, + {file = "websockets-13.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:61fc0dfcda609cda0fc9fe7977694c0c59cf9d749fbb17f4e9483929e3c48a19"}, + {file = "websockets-13.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ceec59f59d092c5007e815def4ebb80c2de330e9588e101cf8bd94c143ec78a5"}, + {file = "websockets-13.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:c1dca61c6db1166c48b95198c0b7d9c990b30c756fc2923cc66f68d17dc558fd"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:308e20f22c2c77f3f39caca508e765f8725020b84aa963474e18c59accbf4c02"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62d516c325e6540e8a57b94abefc3459d7dab8ce52ac75c96cad5549e187e3a7"}, + {file = "websockets-13.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87c6e35319b46b99e168eb98472d6c7d8634ee37750d7693656dc766395df096"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5f9fee94ebafbc3117c30be1844ed01a3b177bb6e39088bc6b2fa1dc15572084"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:7c1e90228c2f5cdde263253fa5db63e6653f1c00e7ec64108065a0b9713fa1b3"}, + {file = "websockets-13.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6548f29b0e401eea2b967b2fdc1c7c7b5ebb3eeb470ed23a54cd45ef078a0db9"}, + {file = "websockets-13.1-cp311-cp311-win32.whl", hash = "sha256:c11d4d16e133f6df8916cc5b7e3e96ee4c44c936717d684a94f48f82edb7c92f"}, + {file = "websockets-13.1-cp311-cp311-win_amd64.whl", hash = "sha256:d04f13a1d75cb2b8382bdc16ae6fa58c97337253826dfe136195b7f89f661557"}, + {file = "websockets-13.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:9d75baf00138f80b48f1eac72ad1535aac0b6461265a0bcad391fc5aba875cfc"}, + {file = "websockets-13.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:9b6f347deb3dcfbfde1c20baa21c2ac0751afaa73e64e5b693bb2b848efeaa49"}, + {file = "websockets-13.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:de58647e3f9c42f13f90ac7e5f58900c80a39019848c5547bc691693098ae1bd"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1b54689e38d1279a51d11e3467dd2f3a50f5f2e879012ce8f2d6943f00e83f0"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf1781ef73c073e6b0f90af841aaf98501f975d306bbf6221683dd594ccc52b6"}, + {file = "websockets-13.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8d23b88b9388ed85c6faf0e74d8dec4f4d3baf3ecf20a65a47b836d56260d4b9"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3c78383585f47ccb0fcf186dcb8a43f5438bd7d8f47d69e0b56f71bf431a0a68"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:d6d300f8ec35c24025ceb9b9019ae9040c1ab2f01cddc2bcc0b518af31c75c14"}, + {file = "websockets-13.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a9dcaf8b0cc72a392760bb8755922c03e17a5a54e08cca58e8b74f6902b433cf"}, + {file = "websockets-13.1-cp312-cp312-win32.whl", hash = "sha256:2f85cf4f2a1ba8f602298a853cec8526c2ca42a9a4b947ec236eaedb8f2dc80c"}, + {file = "websockets-13.1-cp312-cp312-win_amd64.whl", hash = "sha256:38377f8b0cdeee97c552d20cf1865695fcd56aba155ad1b4ca8779a5b6ef4ac3"}, + {file = "websockets-13.1-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a9ab1e71d3d2e54a0aa646ab6d4eebfaa5f416fe78dfe4da2839525dc5d765c6"}, + {file = "websockets-13.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b9d7439d7fab4dce00570bb906875734df13d9faa4b48e261c440a5fec6d9708"}, + {file = "websockets-13.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:327b74e915cf13c5931334c61e1a41040e365d380f812513a255aa804b183418"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:325b1ccdbf5e5725fdcb1b0e9ad4d2545056479d0eee392c291c1bf76206435a"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:346bee67a65f189e0e33f520f253d5147ab76ae42493804319b5716e46dddf0f"}, + {file = "websockets-13.1-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:91a0fa841646320ec0d3accdff5b757b06e2e5c86ba32af2e0815c96c7a603c5"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:18503d2c5f3943e93819238bf20df71982d193f73dcecd26c94514f417f6b135"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a9cd1af7e18e5221d2878378fbc287a14cd527fdd5939ed56a18df8a31136bb2"}, + {file = "websockets-13.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:70c5be9f416aa72aab7a2a76c90ae0a4fe2755c1816c153c1a2bcc3333ce4ce6"}, + {file = "websockets-13.1-cp313-cp313-win32.whl", hash = "sha256:624459daabeb310d3815b276c1adef475b3e6804abaf2d9d2c061c319f7f187d"}, + {file = "websockets-13.1-cp313-cp313-win_amd64.whl", hash = "sha256:c518e84bb59c2baae725accd355c8dc517b4a3ed8db88b4bc93c78dae2974bf2"}, + {file = "websockets-13.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:c7934fd0e920e70468e676fe7f1b7261c1efa0d6c037c6722278ca0228ad9d0d"}, + {file = "websockets-13.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:149e622dc48c10ccc3d2760e5f36753db9cacf3ad7bc7bbbfd7d9c819e286f23"}, + {file = "websockets-13.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a569eb1b05d72f9bce2ebd28a1ce2054311b66677fcd46cf36204ad23acead8c"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:95df24ca1e1bd93bbca51d94dd049a984609687cb2fb08a7f2c56ac84e9816ea"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d8dbb1bf0c0a4ae8b40bdc9be7f644e2f3fb4e8a9aca7145bfa510d4a374eeb7"}, + {file = "websockets-13.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:035233b7531fb92a76beefcbf479504db8c72eb3bff41da55aecce3a0f729e54"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:e4450fc83a3df53dec45922b576e91e94f5578d06436871dce3a6be38e40f5db"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:463e1c6ec853202dd3657f156123d6b4dad0c546ea2e2e38be2b3f7c5b8e7295"}, + {file = "websockets-13.1-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:6d6855bbe70119872c05107e38fbc7f96b1d8cb047d95c2c50869a46c65a8e96"}, + {file = "websockets-13.1-cp38-cp38-win32.whl", hash = "sha256:204e5107f43095012b00f1451374693267adbb832d29966a01ecc4ce1db26faf"}, + {file = "websockets-13.1-cp38-cp38-win_amd64.whl", hash = "sha256:485307243237328c022bc908b90e4457d0daa8b5cf4b3723fd3c4a8012fce4c6"}, + {file = "websockets-13.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:9b37c184f8b976f0c0a231a5f3d6efe10807d41ccbe4488df8c74174805eea7d"}, + {file = "websockets-13.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:163e7277e1a0bd9fb3c8842a71661ad19c6aa7bb3d6678dc7f89b17fbcc4aeb7"}, + {file = "websockets-13.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4b889dbd1342820cc210ba44307cf75ae5f2f96226c0038094455a96e64fb07a"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:586a356928692c1fed0eca68b4d1c2cbbd1ca2acf2ac7e7ebd3b9052582deefa"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7bd6abf1e070a6b72bfeb71049d6ad286852e285f146682bf30d0296f5fbadfa"}, + {file = "websockets-13.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6d2aad13a200e5934f5a6767492fb07151e1de1d6079c003ab31e1823733ae79"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:df01aea34b6e9e33572c35cd16bae5a47785e7d5c8cb2b54b2acdb9678315a17"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:e54affdeb21026329fb0744ad187cf812f7d3c2aa702a5edb562b325191fcab6"}, + {file = "websockets-13.1-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:9ef8aa8bdbac47f4968a5d66462a2a0935d044bf35c0e5a8af152d58516dbeb5"}, + {file = "websockets-13.1-cp39-cp39-win32.whl", hash = "sha256:deeb929efe52bed518f6eb2ddc00cc496366a14c726005726ad62c2dd9017a3c"}, + {file = "websockets-13.1-cp39-cp39-win_amd64.whl", hash = "sha256:7c65ffa900e7cc958cd088b9a9157a8141c991f8c53d11087e6fb7277a03f81d"}, + {file = "websockets-13.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:5dd6da9bec02735931fccec99d97c29f47cc61f644264eb995ad6c0c27667238"}, + {file = "websockets-13.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:2510c09d8e8df777177ee3d40cd35450dc169a81e747455cc4197e63f7e7bfe5"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f1c3cf67185543730888b20682fb186fc8d0fa6f07ccc3ef4390831ab4b388d9"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bcc03c8b72267e97b49149e4863d57c2d77f13fae12066622dc78fe322490fe6"}, + {file = "websockets-13.1-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:004280a140f220c812e65f36944a9ca92d766b6cc4560be652a0a3883a79ed8a"}, + {file = "websockets-13.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e2620453c075abeb0daa949a292e19f56de518988e079c36478bacf9546ced23"}, + {file = "websockets-13.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:9156c45750b37337f7b0b00e6248991a047be4aa44554c9886fe6bdd605aab3b"}, + {file = "websockets-13.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:80c421e07973a89fbdd93e6f2003c17d20b69010458d3a8e37fb47874bd67d51"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:82d0ba76371769d6a4e56f7e83bb8e81846d17a6190971e38b5de108bde9b0d7"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e9875a0143f07d74dc5e1ded1c4581f0d9f7ab86c78994e2ed9e95050073c94d"}, + {file = "websockets-13.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a11e38ad8922c7961447f35c7b17bffa15de4d17c70abd07bfbe12d6faa3e027"}, + {file = "websockets-13.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:4059f790b6ae8768471cddb65d3c4fe4792b0ab48e154c9f0a04cefaabcd5978"}, + {file = "websockets-13.1-pp39-pypy39_pp73-macosx_10_15_x86_64.whl", hash = "sha256:25c35bf84bf7c7369d247f0b8cfa157f989862c49104c5cf85cb5436a641d93e"}, + {file = "websockets-13.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:83f91d8a9bb404b8c2c41a707ac7f7f75b9442a0a876df295de27251a856ad09"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a43cfdcddd07f4ca2b1afb459824dd3c6d53a51410636a2c7fc97b9a8cf4842"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48a2ef1381632a2f0cb4efeff34efa97901c9fbc118e01951ad7cfc10601a9bb"}, + {file = "websockets-13.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:459bf774c754c35dbb487360b12c5727adab887f1622b8aed5755880a21c4a20"}, + {file = "websockets-13.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:95858ca14a9f6fa8413d29e0a585b31b278388aa775b8a81fa24830123874678"}, + {file = "websockets-13.1-py3-none-any.whl", hash = "sha256:a9a396a6ad26130cdae92ae10c36af09d9bfe6cafe69670fd3b6da9b07b4044f"}, + {file = "websockets-13.1.tar.gz", hash = "sha256:a3b3366087c1bc0a2795111edcadddb8b3b59509d5db5d7ea3fdd69f954a8878"}, ] [[package]] @@ -3423,4 +3440,4 @@ microphone = ["sounddevice"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4" -content-hash = "0d8c6b62783e6e3a1447345a49dc0a1175830c1bdf378d69c16628085eed419f" +content-hash = "ac3ed54f9220a726793d76d482bfd8200f55fa4620eebc890038d5687305c72b"