From b9ecb7e957e0ded0272b3a63f55191a514de2cd8 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 19:59:40 +0000 Subject: [PATCH] SDK regeneration --- .mock/fern.config.json | 2 +- package.json | 8 +- reference.md | 1396 +++++++++++++------------- src/Client.ts | 16 +- src/api/resources/index.ts | 2 +- src/core/index.ts | 2 +- src/serialization/resources/index.ts | 2 +- src/version.ts | 2 +- 8 files changed, 713 insertions(+), 717 deletions(-) diff --git a/.mock/fern.config.json b/.mock/fern.config.json index 6b112b3b..08e267ee 100644 --- a/.mock/fern.config.json +++ b/.mock/fern.config.json @@ -1,4 +1,4 @@ { "organization" : "hume", - "version" : "0.99.1" + "version" : "0.93.2" } \ No newline at end of file diff --git a/package.json b/package.json index 6a0f136e..7cc91318 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hume", - "version": "0.15.2", + "version": "0.15.3", "private": false, "repository": "github:humeai/hume-typescript-sdk", "type": "commonjs", @@ -32,11 +32,7 @@ }, "default": "./dist/cjs/serialization/index.js" }, - "./package.json": "./package.json", - "./core": { - "types": "./dist/esm/core/index.d.mts", - "default": "./dist/esm/core/index.mjs" - } + "./package.json": "./package.json" }, "files": [ "dist", diff --git a/reference.md b/reference.md index 66e5ea46..1b152fa5 100644 --- a/reference.md +++ b/reference.md @@ -1,8 +1,8 @@ # Reference -## Tts +## EmpathicVoice Tools -
client.tts.synthesizeJson({ ...params }) -> Hume.ReturnTts +
client.empathicVoice.tools.listTools({ ...params }) -> core.Page
@@ -14,9 +14,9 @@
-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 includes the base64-encoded audio and metadata in JSON 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.
@@ -32,28 +32,22 @@ The response includes the base64-encoded audio and metadata in JSON format.
```typescript -await client.tts.synthesizeJson({ - context: { - utterances: [ - { - 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: { - type: "mp3", - }, - numGenerations: 1, - utterances: [ - { - 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.", - }, - ], +const response = await client.empathicVoice.tools.listTools({ + pageNumber: 0, + pageSize: 2, }); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.tools.listTools({ + pageNumber: 0, + pageSize: 2, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -69,7 +63,7 @@ await client.tts.synthesizeJson({
-**request:** `Hume.PostedTts` +**request:** `Hume.empathicVoice.ToolsListToolsRequest`
@@ -77,7 +71,7 @@ await client.tts.synthesizeJson({
-**requestOptions:** `Tts.RequestOptions` +**requestOptions:** `Tools.RequestOptions`
@@ -88,7 +82,7 @@ await client.tts.synthesizeJson({
-
client.tts.synthesizeFile({ ...params }) -> core.BinaryResponse +
client.empathicVoice.tools.createTool({ ...params }) -> Hume.ReturnUserDefinedTool | undefined
@@ -100,9 +94,9 @@ await client.tts.synthesizeJson({
-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. +Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). -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.
@@ -118,21 +112,13 @@ The response contains the generated audio file in the requested format.
```typescript -await client.tts.synthesizeFile({ - context: { - generationId: "09ad914d-8e7f-40f8-a279-e34f07f7dab2", - }, - format: { - type: "mp3", - }, - numGenerations: 1, - utterances: [ - { - 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.", - }, - ], +await client.empathicVoice.tools.createTool({ + 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"] }', + versionDescription: "Fetches current weather and uses celsius or fahrenheit based on location of user.", + description: "This tool is for getting the current weather.", + fallbackContent: "Unable to fetch current weather.", }); ``` @@ -149,7 +135,7 @@ await client.tts.synthesizeFile({
-**request:** `Hume.PostedTts` +**request:** `Hume.empathicVoice.PostedUserDefinedTool`
@@ -157,7 +143,7 @@ await client.tts.synthesizeFile({
-**requestOptions:** `Tts.RequestOptions` +**requestOptions:** `Tools.RequestOptions`
@@ -168,7 +154,7 @@ await client.tts.synthesizeFile({
-
client.tts.synthesizeFileStreaming({ ...params }) -> core.BinaryResponse +
client.empathicVoice.tools.listToolVersions(id, { ...params }) -> core.Page
@@ -180,7 +166,9 @@ await client.tts.synthesizeFile({
-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.
@@ -196,17 +184,16 @@ Streams synthesized speech using the specified voice. If no voice is provided, a
```typescript -await client.tts.synthesizeFileStreaming({ - utterances: [ - { - text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - voice: { - name: "Male English Actor", - provider: "HUME_AI", - }, - }, - ], -}); +const response = await client.empathicVoice.tools.listToolVersions("00183a3f-79ba-413d-9f3b-609864268bea"); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.tools.listToolVersions("00183a3f-79ba-413d-9f3b-609864268bea"); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -222,7 +209,7 @@ await client.tts.synthesizeFileStreaming({
-**request:** `Hume.PostedTts` +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -230,7 +217,15 @@ await client.tts.synthesizeFileStreaming({
-**requestOptions:** `Tts.RequestOptions` +**request:** `Hume.empathicVoice.ToolsListToolVersionsRequest` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions`
@@ -241,7 +236,7 @@ await client.tts.synthesizeFileStreaming({
-
client.tts.synthesizeJsonStreaming({ ...params }) -> core.Stream +
client.empathicVoice.tools.createToolVersion(id, { ...params }) -> Hume.ReturnUserDefinedTool | undefined
@@ -253,9 +248,9 @@ await client.tts.synthesizeFileStreaming({
-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.
@@ -271,20 +266,13 @@ The response is a stream of JSON objects including audio encoded in base64.
```typescript -const response = await client.tts.synthesizeJsonStreaming({ - utterances: [ - { - text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", - voice: { - name: "Male English Actor", - provider: "HUME_AI", - }, - }, - ], +await client.empathicVoice.tools.createToolVersion("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"] }', + versionDescription: "Fetches current weather and uses celsius, fahrenheit, or kelvin based on location of user.", + fallbackContent: "Unable to fetch current weather.", + description: "This tool is for getting the current weather.", }); -for await (const item of response) { - console.log(item); -} ```
@@ -300,7 +288,7 @@ for await (const item of response) {
-**request:** `Hume.PostedTts` +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -308,7 +296,15 @@ for await (const item of response) {
-**requestOptions:** `Tts.RequestOptions` +**request:** `Hume.empathicVoice.PostedUserDefinedToolVersion` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions`
@@ -319,9 +315,7 @@ for await (const item of response) {
-## Tts Voices - -
client.tts.voices.list({ ...params }) -> core.Page +
client.empathicVoice.tools.deleteTool(id) -> void
@@ -333,7 +327,9 @@ for await (const item of response) {
-Lists voices you have saved in your account, or voices from the [Voice Library](https://platform.hume.ai/tts/voice-library). +Deletes a **Tool** and its 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.
@@ -349,20 +345,7 @@ Lists voices you have saved in your account, or voices from the [Voice Library](
```typescript -const response = await client.tts.voices.list({ - provider: "CUSTOM_VOICE", -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.tts.voices.list({ - provider: "CUSTOM_VOICE", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268bea"); ```
@@ -378,7 +361,7 @@ while (page.hasNextPage()) {
-**request:** `Hume.tts.VoicesListRequest` +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -386,7 +369,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Voices.RequestOptions` +**requestOptions:** `Tools.RequestOptions`
@@ -397,7 +380,7 @@ while (page.hasNextPage()) {
-
client.tts.voices.create({ ...params }) -> Hume.ReturnVoice +
client.empathicVoice.tools.updateToolName(id, { ...params }) -> string
@@ -409,9 +392,9 @@ while (page.hasNextPage()) {
-Saves a new custom voice to your account using the specified TTS generation ID. +Updates the name 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.
@@ -427,9 +410,8 @@ Once saved, this voice can be reused in subsequent TTS requests, ensuring consis
```typescript -await client.tts.voices.create({ - generationId: "795c949a-1510-4a80-9646-7d0863b023ab", - name: "David Hume", +await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-609864268bea", { + name: "get_current_temperature", }); ``` @@ -446,7 +428,7 @@ await client.tts.voices.create({
-**request:** `Hume.tts.PostedVoice` +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -454,7 +436,15 @@ await client.tts.voices.create({
-**requestOptions:** `Voices.RequestOptions` +**request:** `Hume.empathicVoice.PostedUserDefinedToolName` + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions`
@@ -465,7 +455,7 @@ await client.tts.voices.create({
-
client.tts.voices.delete({ ...params }) -> void +
client.empathicVoice.tools.getToolVersion(id, version) -> Hume.ReturnUserDefinedTool | undefined
@@ -477,7 +467,9 @@ await client.tts.voices.create({
-Deletes a previously generated custom voice. +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.
@@ -493,9 +485,7 @@ Deletes a previously generated custom voice.
```typescript -await client.tts.voices.delete({ - name: "David Hume", -}); +await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1); ```
@@ -511,7 +501,7 @@ await client.tts.voices.delete({
-**request:** `Hume.tts.VoicesDeleteRequest` +**id:** `string` — Identifier for a Tool. Formatted as a UUID.
@@ -519,7 +509,21 @@ await client.tts.voices.delete({
-**requestOptions:** `Voices.RequestOptions` +**version:** `number` + +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. + +
+
+ +
+
+ +**requestOptions:** `Tools.RequestOptions`
@@ -530,9 +534,7 @@ await client.tts.voices.delete({
-## EmpathicVoice Tools - -
client.empathicVoice.tools.listTools({ ...params }) -> core.Page +
client.empathicVoice.tools.deleteToolVersion(id, version) -> void
@@ -544,7 +546,7 @@ await client.tts.voices.delete({
-Fetches a paginated list of **Tools**. +Deletes 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. @@ -562,23 +564,8 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -const response = await client.empathicVoice.tools.listTools({ - pageNumber: 0, - pageSize: 2, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.tools.listTools({ - pageNumber: 0, - pageSize: 2, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} -``` +await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1); +```
@@ -593,7 +580,21 @@ while (page.hasNextPage()) {
-**request:** `Hume.empathicVoice.ToolsListToolsRequest` +**id:** `string` — Identifier for a Tool. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `number` + +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.
@@ -612,7 +613,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.tools.createTool({ ...params }) -> Hume.ReturnUserDefinedTool | undefined +
client.empathicVoice.tools.updateToolDescription(id, version, { ...params }) -> Hume.ReturnUserDefinedTool | undefined
@@ -624,7 +625,7 @@ while (page.hasNextPage()) {
-Creates a **Tool** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). +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. @@ -642,13 +643,9 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.createTool({ - 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"] }', - versionDescription: "Fetches current weather and uses celsius or fahrenheit based on location of user.", - description: "This tool is for getting the current weather.", - fallbackContent: "Unable to fetch current weather.", +await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b-609864268bea", 1, { + versionDescription: + "Fetches current temperature, precipitation, wind speed, AQI, and other weather conditions. Uses Celsius, Fahrenheit, or kelvin depending on user's region.", }); ``` @@ -665,7 +662,29 @@ await client.empathicVoice.tools.createTool({
-**request:** `Hume.empathicVoice.PostedUserDefinedTool` +**id:** `string` — Identifier for a Tool. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `number` + +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. + +
+
+ +
+
+ +**request:** `Hume.empathicVoice.PostedUserDefinedToolVersionDescription`
@@ -684,7 +703,9 @@ await client.empathicVoice.tools.createTool({
-
client.empathicVoice.tools.listToolVersions(id, { ...params }) -> core.Page +## EmpathicVoice Prompts + +
client.empathicVoice.prompts.listPrompts({ ...params }) -> core.Page
@@ -696,9 +717,9 @@ await client.empathicVoice.tools.createTool({
-Fetches a list of a **Tool's** versions. +Fetches a paginated list of **Prompts**. -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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -714,13 +735,19 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -const response = await client.empathicVoice.tools.listToolVersions("00183a3f-79ba-413d-9f3b-609864268bea"); +const response = await client.empathicVoice.prompts.listPrompts({ + pageNumber: 0, + pageSize: 2, +}); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.empathicVoice.tools.listToolVersions("00183a3f-79ba-413d-9f3b-609864268bea"); +let page = await client.empathicVoice.prompts.listPrompts({ + pageNumber: 0, + pageSize: 2, +}); while (page.hasNextPage()) { page = page.getNextPage(); } @@ -739,15 +766,7 @@ while (page.hasNextPage()) {
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ToolsListToolVersionsRequest` +**request:** `Hume.empathicVoice.PromptsListPromptsRequest`
@@ -755,7 +774,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -766,7 +785,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.tools.createToolVersion(id, { ...params }) -> Hume.ReturnUserDefinedTool | undefined +
client.empathicVoice.prompts.createPrompt({ ...params }) -> Hume.ReturnPrompt | undefined
@@ -778,9 +797,9 @@ while (page.hasNextPage()) {
-Updates a **Tool** by creating a new version of the **Tool**. +Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). -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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -796,12 +815,9 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.createToolVersion("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"] }', - versionDescription: "Fetches current weather and uses celsius, fahrenheit, or kelvin based on location of user.", - fallbackContent: "Unable to fetch current weather.", - description: "This tool is for getting the current weather.", +await client.empathicVoice.prompts.createPrompt({ + 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.", }); ``` @@ -818,15 +834,7 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.PostedUserDefinedToolVersion` +**request:** `Hume.empathicVoice.PostedPrompt`
@@ -834,7 +842,7 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -845,7 +853,7 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
-
client.empathicVoice.tools.deleteTool(id) -> void +
client.empathicVoice.prompts.listPromptVersions(id, { ...params }) -> Hume.ReturnPagedPrompts
@@ -857,9 +865,9 @@ await client.empathicVoice.tools.createToolVersion("00183a3f-79ba-413d-9f3b-6098
-Deletes a **Tool** and its versions. +Fetches a list of a **Prompt'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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -875,7 +883,7 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268bea"); +await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-af9e5da3bac5"); ```
@@ -891,7 +899,7 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -899,7 +907,15 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
-**requestOptions:** `Tools.RequestOptions` +**request:** `Hume.empathicVoice.PromptsListPromptVersionsRequest` + +
+
+ +
+
+ +**requestOptions:** `Prompts.RequestOptions`
@@ -910,7 +926,7 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
-
client.empathicVoice.tools.updateToolName(id, { ...params }) -> string +
client.empathicVoice.prompts.createPromptVersion(id, { ...params }) -> Hume.ReturnPrompt | undefined
@@ -922,9 +938,9 @@ await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268be
-Updates the name of a **Tool**. +Updates a **Prompt** by creating a new version of the **Prompt**. -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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -940,8 +956,9 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-609864268bea", { - name: "get_current_temperature", +await client.empathicVoice.prompts.createPromptVersion("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.", + versionDescription: "This is an updated version of the Weather Assistant Prompt.", }); ``` @@ -958,7 +975,7 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -966,7 +983,7 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-**request:** `Hume.empathicVoice.PostedUserDefinedToolName` +**request:** `Hume.empathicVoice.PostedPromptVersion`
@@ -974,7 +991,7 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -985,7 +1002,7 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-
client.empathicVoice.tools.getToolVersion(id, version) -> Hume.ReturnUserDefinedTool | undefined +
client.empathicVoice.prompts.deletePrompt(id) -> void
@@ -997,9 +1014,9 @@ await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-6098642
-Fetches a specified version of a **Tool**. +Deletes a **Prompt** and its 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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -1015,7 +1032,7 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1); +await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da3bac5"); ```
@@ -1031,21 +1048,7 @@ await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-6098642
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. - -
-
- -
-
- -**version:** `number` - -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. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1053,7 +1056,7 @@ Version numbers are integer values representing different iterations of the Tool
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -1064,7 +1067,7 @@ Version numbers are integer values representing different iterations of the Tool
-
client.empathicVoice.tools.deleteToolVersion(id, version) -> void +
client.empathicVoice.prompts.updatePromptName(id, { ...params }) -> string
@@ -1076,9 +1079,9 @@ Version numbers are integer values representing different iterations of the Tool
-Deletes a specified version of a **Tool**. +Updates the name of a **Prompt**. -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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -1094,7 +1097,9 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1); +await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9e5da3bac5", { + name: "Updated Weather Assistant Prompt Name", +}); ```
@@ -1110,7 +1115,7 @@ await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-6098
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1118,13 +1123,7 @@ await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-6098
-**version:** `number` - -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. +**request:** `Hume.empathicVoice.PostedPromptName`
@@ -1132,7 +1131,7 @@ Version numbers are integer values representing different iterations of the Tool
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -1143,7 +1142,7 @@ Version numbers are integer values representing different iterations of the Tool
-
client.empathicVoice.tools.updateToolDescription(id, version, { ...params }) -> Hume.ReturnUserDefinedTool | undefined +
client.empathicVoice.prompts.getPromptVersion(id, version) -> Hume.ReturnPrompt | undefined
@@ -1155,9 +1154,9 @@ Version numbers are integer values representing different iterations of the Tool
-Updates the description of a specified **Tool** version. +Fetches a specified version of a **Prompt**. -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. +See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt.
@@ -1173,10 +1172,7 @@ Refer to our [tool use](/docs/speech-to-speech-evi/features/tool-use#function-ca
```typescript -await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b-609864268bea", 1, { - versionDescription: - "Fetches current temperature, precipitation, wind speed, AQI, and other weather conditions. Uses Celsius, Fahrenheit, or kelvin depending on user's region.", -}); +await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 0); ```
@@ -1192,7 +1188,7 @@ await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b-
-**id:** `string` — Identifier for a Tool. Formatted as a UUID. +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1202,19 +1198,11 @@ await client.empathicVoice.tools.updateToolDescription("00183a3f-79ba-413d-9f3b- **version:** `number` -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 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. -**request:** `Hume.empathicVoice.PostedUserDefinedToolVersionDescription` +Version numbers are integer values representing different iterations of the Prompt. Each update to the Prompt increments its version number.
@@ -1222,7 +1210,7 @@ Version numbers are integer values representing different iterations of the Tool
-**requestOptions:** `Tools.RequestOptions` +**requestOptions:** `Prompts.RequestOptions`
@@ -1233,9 +1221,7 @@ Version numbers are integer values representing different iterations of the Tool
-## EmpathicVoice Prompts - -
client.empathicVoice.prompts.listPrompts({ ...params }) -> core.Page +
client.empathicVoice.prompts.deletePromptVersion(id, version) -> void
@@ -1247,7 +1233,7 @@ Version numbers are integer values representing different iterations of the Tool
-Fetches a paginated list of **Prompts**. +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. @@ -1265,22 +1251,7 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -const response = await client.empathicVoice.prompts.listPrompts({ - pageNumber: 0, - pageSize: 2, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.prompts.listPrompts({ - pageNumber: 0, - pageSize: 2, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 1); ```
@@ -1296,7 +1267,7 @@ while (page.hasNextPage()) {
-**request:** `Hume.empathicVoice.PromptsListPromptsRequest` +**id:** `string` — Identifier for a Prompt. Formatted as a UUID.
@@ -1304,9 +1275,23 @@ while (page.hasNextPage()) {
-**requestOptions:** `Prompts.RequestOptions` +**version:** `number` -
+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. + +
+
+ +
+
+ +**requestOptions:** `Prompts.RequestOptions` + +
@@ -1315,7 +1300,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.prompts.createPrompt({ ...params }) -> Hume.ReturnPrompt | undefined +
client.empathicVoice.prompts.updatePromptDescription(id, version, { ...params }) -> Hume.ReturnPrompt | undefined
@@ -1327,7 +1312,7 @@ while (page.hasNextPage()) {
-Creates a **Prompt** that can be added to an [EVI configuration](/reference/speech-to-speech-evi/configs/create-config). +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. @@ -1345,9 +1330,8 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.createPrompt({ - 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.", +await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-91b9-af9e5da3bac5", 1, { + versionDescription: "This is an updated version_description.", }); ``` @@ -1364,7 +1348,29 @@ await client.empathicVoice.prompts.createPrompt({
-**request:** `Hume.empathicVoice.PostedPrompt` +**id:** `string` — Identifier for a Prompt. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `number` + +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. + +
+
+ +
+
+ +**request:** `Hume.empathicVoice.PostedPromptVersionDescription`
@@ -1383,7 +1389,9 @@ await client.empathicVoice.prompts.createPrompt({
-
client.empathicVoice.prompts.listPromptVersions(id, { ...params }) -> Hume.ReturnPagedPrompts +## EmpathicVoice Configs + +
client.empathicVoice.configs.listConfigs({ ...params }) -> core.Page
@@ -1395,9 +1403,9 @@ await client.empathicVoice.prompts.createPrompt({
-Fetches a list of a **Prompt's** versions. +Fetches a paginated list of **Configs**. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1413,7 +1421,22 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-af9e5da3bac5"); +const response = await client.empathicVoice.configs.listConfigs({ + pageNumber: 0, + pageSize: 1, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.configs.listConfigs({ + pageNumber: 0, + pageSize: 1, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -1429,15 +1452,7 @@ await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-a
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.PromptsListPromptVersionsRequest` +**request:** `Hume.empathicVoice.ConfigsListConfigsRequest`
@@ -1445,7 +1460,7 @@ await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-a
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1456,7 +1471,7 @@ await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-a
-
client.empathicVoice.prompts.createPromptVersion(id, { ...params }) -> Hume.ReturnPrompt | undefined +
client.empathicVoice.configs.createConfig({ ...params }) -> Hume.ReturnConfig
@@ -1468,9 +1483,9 @@ await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-a
-Updates a **Prompt** by creating a new version of the **Prompt**. +Creates a **Config** which can be applied to EVI. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1486,9 +1501,36 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.createPromptVersion("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.", - versionDescription: "This is an updated version of the Weather Assistant Prompt.", +await client.empathicVoice.configs.createConfig({ + name: "Weather Assistant Config", + prompt: { + id: "af699d45-2985-42cc-91b9-af9e5da3bac5", + version: 0, + }, + eviVersion: "3", + voice: { + provider: "HUME_AI", + name: "Ava Song", + }, + languageModel: { + modelProvider: "ANTHROPIC", + modelResource: "claude-3-7-sonnet-latest", + temperature: 1, + }, + eventMessages: { + onNewChat: { + enabled: false, + text: "", + }, + onInactivityTimeout: { + enabled: false, + text: "", + }, + onMaxDurationTimeout: { + enabled: false, + text: "", + }, + }, }); ``` @@ -1505,15 +1547,7 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.PostedPromptVersion` +**request:** `Hume.empathicVoice.PostedConfig`
@@ -1521,7 +1555,7 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1532,7 +1566,7 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
-
client.empathicVoice.prompts.deletePrompt(id) -> void +
client.empathicVoice.configs.listConfigVersions(id, { ...params }) -> core.Page
@@ -1544,9 +1578,9 @@ await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-
-Deletes a **Prompt** and its versions. +Fetches a list of a **Config's** versions. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1562,7 +1596,16 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da3bac5"); +const response = await client.empathicVoice.configs.listConfigVersions("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.configs.listConfigVersions("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -1578,7 +1621,7 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1586,7 +1629,15 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
-**requestOptions:** `Prompts.RequestOptions` +**request:** `Hume.empathicVoice.ConfigsListConfigVersionsRequest` + +
+
+ +
+
+ +**requestOptions:** `Configs.RequestOptions`
@@ -1597,7 +1648,7 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
-
client.empathicVoice.prompts.updatePromptName(id, { ...params }) -> string +
client.empathicVoice.configs.createConfigVersion(id, { ...params }) -> Hume.ReturnConfig
@@ -1609,9 +1660,9 @@ await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da
-Updates the name of a **Prompt**. +Updates a **Config** by creating a new version of the **Config**. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1627,8 +1678,39 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9e5da3bac5", { - name: "Updated Weather Assistant Prompt Name", +await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", { + versionDescription: "This is an updated version of the Weather Assistant Config.", + eviVersion: "3", + prompt: { + id: "af699d45-2985-42cc-91b9-af9e5da3bac5", + version: 0, + }, + voice: { + provider: "HUME_AI", + name: "Ava Song", + }, + languageModel: { + modelProvider: "ANTHROPIC", + modelResource: "claude-3-7-sonnet-latest", + temperature: 1, + }, + ellmModel: { + allowShortResponses: true, + }, + eventMessages: { + onNewChat: { + enabled: false, + text: "", + }, + onInactivityTimeout: { + enabled: false, + text: "", + }, + onMaxDurationTimeout: { + enabled: false, + text: "", + }, + }, }); ``` @@ -1645,7 +1727,7 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1653,7 +1735,7 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-**request:** `Hume.empathicVoice.PostedPromptName` +**request:** `Hume.empathicVoice.PostedConfigVersion`
@@ -1661,7 +1743,7 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1672,7 +1754,7 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-
client.empathicVoice.prompts.getPromptVersion(id, version) -> Hume.ReturnPrompt | undefined +
client.empathicVoice.configs.deleteConfig(id) -> void
@@ -1684,9 +1766,9 @@ await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9
-Fetches a specified version of a **Prompt**. +Deletes a **Config** and its versions. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1702,7 +1784,7 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 0); +await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); ```
@@ -1718,21 +1800,7 @@ await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. - -
-
- -
-
- -**version:** `number` - -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. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1740,7 +1808,7 @@ Version numbers are integer values representing different iterations of the Prom
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1751,7 +1819,7 @@ Version numbers are integer values representing different iterations of the Prom
-
client.empathicVoice.prompts.deletePromptVersion(id, version) -> void +
client.empathicVoice.configs.updateConfigName(id, { ...params }) -> string
@@ -1763,9 +1831,9 @@ Version numbers are integer values representing different iterations of the Prom
-Deletes a specified version of a **Prompt**. +Updates the name of a **Config**. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1781,7 +1849,9 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 1); +await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189d354db3f3", { + name: "Updated Weather Assistant Config Name", +}); ```
@@ -1797,7 +1867,7 @@ await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1805,21 +1875,15 @@ await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-
-**version:** `number` +**request:** `Hume.empathicVoice.PostedConfigName` -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. - -
-
+ +
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1830,7 +1894,7 @@ Version numbers are integer values representing different iterations of the Prom
-
client.empathicVoice.prompts.updatePromptDescription(id, version, { ...params }) -> Hume.ReturnPrompt | undefined +
client.empathicVoice.configs.getConfigVersion(id, version) -> Hume.ReturnConfig
@@ -1842,9 +1906,9 @@ Version numbers are integer values representing different iterations of the Prom
-Updates the description of a **Prompt**. +Fetches a specified version of a **Config**. -See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for tips on crafting your system prompt. +For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration).
@@ -1860,9 +1924,7 @@ See our [prompting guide](/docs/speech-to-speech-evi/guides/phone-calling) for t
```typescript -await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-91b9-af9e5da3bac5", 1, { - versionDescription: "This is an updated version_description.", -}); +await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1); ```
@@ -1878,7 +1940,7 @@ await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-9
-**id:** `string` — Identifier for a Prompt. Formatted as a UUID. +**id:** `string` — Identifier for a Config. Formatted as a UUID.
@@ -1888,19 +1950,11 @@ await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-9 **version:** `number` -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 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. -**request:** `Hume.empathicVoice.PostedPromptVersionDescription` +Version numbers are integer values representing different iterations of the Config. Each update to the Config increments its version number.
@@ -1908,7 +1962,7 @@ Version numbers are integer values representing different iterations of the Prom
-**requestOptions:** `Prompts.RequestOptions` +**requestOptions:** `Configs.RequestOptions`
@@ -1919,9 +1973,7 @@ Version numbers are integer values representing different iterations of the Prom
-## EmpathicVoice Configs - -
client.empathicVoice.configs.listConfigs({ ...params }) -> core.Page +
client.empathicVoice.configs.deleteConfigVersion(id, version) -> void
@@ -1933,7 +1985,7 @@ Version numbers are integer values representing different iterations of the Prom
-Fetches a paginated list of **Configs**. +Deletes a specified version of a **Config**. For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). @@ -1951,22 +2003,7 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -const response = await client.empathicVoice.configs.listConfigs({ - pageNumber: 0, - pageSize: 1, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.configs.listConfigs({ - pageNumber: 0, - pageSize: 1, -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} +await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1); ```
@@ -1982,7 +2019,21 @@ while (page.hasNextPage()) {
-**request:** `Hume.empathicVoice.ConfigsListConfigsRequest` +**id:** `string` — Identifier for a Config. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `number` + +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.
@@ -2001,7 +2052,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.configs.createConfig({ ...params }) -> Hume.ReturnConfig +
client.empathicVoice.configs.updateConfigDescription(id, version, { ...params }) -> Hume.ReturnConfig
@@ -2013,7 +2064,7 @@ while (page.hasNextPage()) {
-Creates a **Config** which can be applied to EVI. +Updates the description of a **Config**. For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). @@ -2031,36 +2082,8 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.createConfig({ - name: "Weather Assistant Config", - prompt: { - id: "af699d45-2985-42cc-91b9-af9e5da3bac5", - version: 0, - }, - eviVersion: "3", - voice: { - provider: "HUME_AI", - name: "Ava Song", - }, - languageModel: { - modelProvider: "ANTHROPIC", - modelResource: "claude-3-7-sonnet-latest", - temperature: 1, - }, - eventMessages: { - onNewChat: { - enabled: false, - text: "", - }, - onInactivityTimeout: { - enabled: false, - text: "", - }, - onMaxDurationTimeout: { - enabled: false, - text: "", - }, - }, +await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1, { + versionDescription: "This is an updated version_description.", }); ``` @@ -2077,7 +2100,29 @@ await client.empathicVoice.configs.createConfig({
-**request:** `Hume.empathicVoice.PostedConfig` +**id:** `string` — Identifier for a Config. Formatted as a UUID. + +
+
+ +
+
+ +**version:** `number` + +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. + +
+
+ +
+
+ +**request:** `Hume.empathicVoice.PostedConfigVersionDescription`
@@ -2096,7 +2141,9 @@ await client.empathicVoice.configs.createConfig({
-
client.empathicVoice.configs.listConfigVersions(id, { ...params }) -> core.Page +## EmpathicVoice Chats + +
client.empathicVoice.chats.listChats({ ...params }) -> core.Page
@@ -2108,9 +2155,7 @@ await client.empathicVoice.configs.createConfig({
-Fetches a list of a **Config's** versions. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +Fetches a paginated list of **Chats**.
@@ -2126,13 +2171,21 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -const response = await client.empathicVoice.configs.listConfigVersions("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); +const response = await client.empathicVoice.chats.listChats({ + pageNumber: 0, + pageSize: 1, + ascendingOrder: true, +}); for await (const item of response) { console.log(item); } // Or you can manually iterate page-by-page -let page = await client.empathicVoice.configs.listConfigVersions("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); +let page = await client.empathicVoice.chats.listChats({ + pageNumber: 0, + pageSize: 1, + ascendingOrder: true, +}); while (page.hasNextPage()) { page = page.getNextPage(); } @@ -2151,15 +2204,7 @@ while (page.hasNextPage()) {
-**id:** `string` — Identifier for a Config. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ConfigsListConfigVersionsRequest` +**request:** `Hume.empathicVoice.ChatsListChatsRequest`
@@ -2167,7 +2212,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `Chats.RequestOptions`
@@ -2178,7 +2223,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.configs.createConfigVersion(id, { ...params }) -> Hume.ReturnConfig +
client.empathicVoice.chats.listChatEvents(id, { ...params }) -> core.Page
@@ -2190,9 +2235,7 @@ while (page.hasNextPage()) {
-Updates a **Config** by creating a new version of the **Config**. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +Fetches a paginated list of **Chat** events.
@@ -2208,40 +2251,24 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", { - versionDescription: "This is an updated version of the Weather Assistant Config.", - eviVersion: "3", - prompt: { - id: "af699d45-2985-42cc-91b9-af9e5da3bac5", - version: 0, - }, - voice: { - provider: "HUME_AI", - name: "Ava Song", - }, - languageModel: { - modelProvider: "ANTHROPIC", - modelResource: "claude-3-7-sonnet-latest", - temperature: 1, - }, - ellmModel: { - allowShortResponses: true, - }, - eventMessages: { - onNewChat: { - enabled: false, - text: "", - }, - onInactivityTimeout: { - enabled: false, - text: "", - }, - onMaxDurationTimeout: { - enabled: false, - text: "", - }, - }, +const response = await client.empathicVoice.chats.listChatEvents("470a49f6-1dec-4afe-8b61-035d3b2d63b0", { + pageNumber: 0, + pageSize: 3, + ascendingOrder: true, }); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.chats.listChatEvents("470a49f6-1dec-4afe-8b61-035d3b2d63b0", { + pageNumber: 0, + pageSize: 3, + ascendingOrder: true, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -2257,7 +2284,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**id:** `string` — Identifier for a Config. Formatted as a UUID. +**id:** `string` — Identifier for a Chat. Formatted as a UUID.
@@ -2265,7 +2292,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**request:** `Hume.empathicVoice.PostedConfigVersion` +**request:** `Hume.empathicVoice.ChatsListChatEventsRequest`
@@ -2273,7 +2300,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `Chats.RequestOptions`
@@ -2284,7 +2311,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-
client.empathicVoice.configs.deleteConfig(id) -> void +
client.empathicVoice.chats.getAudio(id) -> Hume.ReturnChatAudioReconstruction
@@ -2296,9 +2323,7 @@ await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-
-Deletes a **Config** and its versions. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +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).
@@ -2314,7 +2339,7 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354db3f3"); +await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"); ```
@@ -2330,7 +2355,7 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
-**id:** `string` — Identifier for a Config. Formatted as a UUID. +**id:** `string` — Identifier for a chat. Formatted as a UUID.
@@ -2338,7 +2363,7 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `Chats.RequestOptions`
@@ -2349,7 +2374,9 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
-
client.empathicVoice.configs.updateConfigName(id, { ...params }) -> string +## EmpathicVoice ChatGroups + +
client.empathicVoice.chatGroups.listChatGroups({ ...params }) -> core.Page
@@ -2361,9 +2388,7 @@ await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354
-Updates the name of a **Config**. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +Fetches a paginated list of **Chat Groups**.
@@ -2379,9 +2404,26 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189d354db3f3", { - name: "Updated Weather Assistant Config Name", +const response = await client.empathicVoice.chatGroups.listChatGroups({ + pageNumber: 0, + pageSize: 1, + ascendingOrder: true, + configId: "1b60e1a0-cc59-424a-8d2c-189d354db3f3", }); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.chatGroups.listChatGroups({ + pageNumber: 0, + pageSize: 1, + ascendingOrder: true, + configId: "1b60e1a0-cc59-424a-8d2c-189d354db3f3", +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -2397,15 +2439,7 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
-**id:** `string` — Identifier for a Config. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.PostedConfigName` +**request:** `Hume.empathicVoice.ChatGroupsListChatGroupsRequest`
@@ -2413,7 +2447,7 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `ChatGroups.RequestOptions`
@@ -2424,7 +2458,7 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
-
client.empathicVoice.configs.getConfigVersion(id, version) -> Hume.ReturnConfig +
client.empathicVoice.chatGroups.getChatGroup(id, { ...params }) -> Hume.ReturnChatGroupPagedChats
@@ -2436,9 +2470,7 @@ await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189
-Fetches a specified version of a **Config**. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**.
@@ -2454,7 +2486,11 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1); +await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19df79f05f", { + pageNumber: 0, + pageSize: 1, + ascendingOrder: true, +}); ```
@@ -2470,7 +2506,7 @@ await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189
-**id:** `string` — Identifier for a Config. Formatted as a UUID. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -2478,13 +2514,7 @@ await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189
-**version:** `number` - -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. +**request:** `Hume.empathicVoice.ChatGroupsGetChatGroupRequest`
@@ -2492,7 +2522,7 @@ Version numbers are integer values representing different iterations of the Conf
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `ChatGroups.RequestOptions`
@@ -2503,7 +2533,7 @@ Version numbers are integer values representing different iterations of the Conf
-
client.empathicVoice.configs.deleteConfigVersion(id, version) -> void +
client.empathicVoice.chatGroups.listChatGroupEvents(id, { ...params }) -> core.Page
@@ -2515,9 +2545,7 @@ Version numbers are integer values representing different iterations of the Conf
-Deletes a specified version of a **Config**. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +Fetches a paginated list of **Chat** events associated with a **Chat Group**.
@@ -2533,7 +2561,24 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1); +const response = await client.empathicVoice.chatGroups.listChatGroupEvents("697056f0-6c7e-487d-9bd8-9c19df79f05f", { + pageNumber: 0, + pageSize: 3, + ascendingOrder: true, +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.empathicVoice.chatGroups.listChatGroupEvents("697056f0-6c7e-487d-9bd8-9c19df79f05f", { + pageNumber: 0, + pageSize: 3, + ascendingOrder: true, +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -2549,7 +2594,7 @@ await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**id:** `string` — Identifier for a Config. Formatted as a UUID. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -2557,13 +2602,7 @@ await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-
-**version:** `number` - -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. +**request:** `Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest`
@@ -2571,7 +2610,7 @@ Version numbers are integer values representing different iterations of the Conf
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `ChatGroups.RequestOptions`
@@ -2582,7 +2621,7 @@ Version numbers are integer values representing different iterations of the Conf
-
client.empathicVoice.configs.updateConfigDescription(id, version, { ...params }) -> Hume.ReturnConfig +
client.empathicVoice.chatGroups.getAudio(id, { ...params }) -> Hume.ReturnChatGroupPagedAudioReconstructions
@@ -2594,9 +2633,7 @@ Version numbers are integer values representing different iterations of the Conf
-Updates the description of a **Config**. - -For more details on configuration options and how to configure EVI, see our [configuration guide](/docs/speech-to-speech-evi/configuration). +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).
@@ -2612,8 +2649,10 @@ For more details on configuration options and how to configure EVI, see our [con
```typescript -await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1, { - versionDescription: "This is an updated version_description.", +await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cdfc78", { + pageNumber: 0, + pageSize: 10, + ascendingOrder: true, }); ``` @@ -2630,21 +2669,7 @@ await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8
-**id:** `string` — Identifier for a Config. Formatted as a UUID. - -
-
- -
-
- -**version:** `number` - -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. +**id:** `string` — Identifier for a Chat Group. Formatted as a UUID.
@@ -2652,7 +2677,7 @@ Version numbers are integer values representing different iterations of the Conf
-**request:** `Hume.empathicVoice.PostedConfigVersionDescription` +**request:** `Hume.empathicVoice.ChatGroupsGetAudioRequest`
@@ -2660,7 +2685,7 @@ Version numbers are integer values representing different iterations of the Conf
-**requestOptions:** `Configs.RequestOptions` +**requestOptions:** `ChatGroups.RequestOptions`
@@ -2671,9 +2696,9 @@ Version numbers are integer values representing different iterations of the Conf
-## EmpathicVoice Chats +## Tts -
client.empathicVoice.chats.listChats({ ...params }) -> core.Page +
client.tts.synthesizeJson({ ...params }) -> Hume.ReturnTts
@@ -2685,7 +2710,9 @@ Version numbers are integer values representing different iterations of the Conf
-Fetches a paginated list of **Chats**. +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.
@@ -2701,24 +2728,28 @@ Fetches a paginated list of **Chats**.
```typescript -const response = await client.empathicVoice.chats.listChats({ - pageNumber: 0, - pageSize: 1, - ascendingOrder: true, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.chats.listChats({ - pageNumber: 0, - pageSize: 1, - ascendingOrder: true, +await client.tts.synthesizeJson({ + context: { + utterances: [ + { + 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: { + type: "mp3", + }, + numGenerations: 1, + utterances: [ + { + 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.", + }, + ], }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -2734,7 +2765,7 @@ while (page.hasNextPage()) {
-**request:** `Hume.empathicVoice.ChatsListChatsRequest` +**request:** `Hume.PostedTts`
@@ -2742,7 +2773,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Chats.RequestOptions` +**requestOptions:** `Tts.RequestOptions`
@@ -2753,7 +2784,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.chats.listChatEvents(id, { ...params }) -> core.Page +
client.tts.synthesizeFile({ ...params }) -> core.BinaryResponse
@@ -2765,7 +2796,9 @@ while (page.hasNextPage()) {
-Fetches a paginated list of **Chat** events. +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 contains the generated audio file in the requested format.
@@ -2781,24 +2814,22 @@ Fetches a paginated list of **Chat** events.
```typescript -const response = await client.empathicVoice.chats.listChatEvents("470a49f6-1dec-4afe-8b61-035d3b2d63b0", { - pageNumber: 0, - pageSize: 3, - ascendingOrder: true, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.chats.listChatEvents("470a49f6-1dec-4afe-8b61-035d3b2d63b0", { - pageNumber: 0, - pageSize: 3, - ascendingOrder: true, +await client.tts.synthesizeFile({ + context: { + generationId: "09ad914d-8e7f-40f8-a279-e34f07f7dab2", + }, + format: { + type: "mp3", + }, + numGenerations: 1, + utterances: [ + { + 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.", + }, + ], }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -2814,15 +2845,7 @@ while (page.hasNextPage()) {
-**id:** `string` — Identifier for a Chat. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ChatsListChatEventsRequest` +**request:** `Hume.PostedTts`
@@ -2830,7 +2853,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `Chats.RequestOptions` +**requestOptions:** `Tts.RequestOptions`
@@ -2841,7 +2864,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.chats.getAudio(id) -> Hume.ReturnChatAudioReconstruction +
client.tts.synthesizeFileStreaming({ ...params }) -> core.BinaryResponse
@@ -2853,7 +2876,7 @@ while (page.hasNextPage()) {
-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). +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.
@@ -2869,7 +2892,17 @@ Fetches the audio of a previous **Chat**. For more details, see our guide on aud
```typescript -await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"); +await client.tts.synthesizeFileStreaming({ + utterances: [ + { + text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + voice: { + name: "Male English Actor", + provider: "HUME_AI", + }, + }, + ], +}); ```
@@ -2885,7 +2918,7 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
-**id:** `string` — Identifier for a chat. Formatted as a UUID. +**request:** `Hume.PostedTts`
@@ -2893,7 +2926,7 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
-**requestOptions:** `Chats.RequestOptions` +**requestOptions:** `Tts.RequestOptions`
@@ -2904,9 +2937,7 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
-## EmpathicVoice ChatGroups - -
client.empathicVoice.chatGroups.listChatGroups({ ...params }) -> core.Page +
client.tts.synthesizeJsonStreaming({ ...params }) -> core.Stream
@@ -2918,7 +2949,9 @@ await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0"
-Fetches a paginated list of **Chat Groups**. +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. + +The response is a stream of JSON objects including audio encoded in base64.
@@ -2934,26 +2967,20 @@ Fetches a paginated list of **Chat Groups**.
```typescript -const response = await client.empathicVoice.chatGroups.listChatGroups({ - pageNumber: 0, - pageSize: 1, - ascendingOrder: true, - configId: "1b60e1a0-cc59-424a-8d2c-189d354db3f3", +const response = await client.tts.synthesizeJsonStreaming({ + utterances: [ + { + text: "Beauty is no quality in things themselves: It exists merely in the mind which contemplates them.", + voice: { + name: "Male English Actor", + provider: "HUME_AI", + }, + }, + ], }); for await (const item of response) { console.log(item); } - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.chatGroups.listChatGroups({ - pageNumber: 0, - pageSize: 1, - ascendingOrder: true, - configId: "1b60e1a0-cc59-424a-8d2c-189d354db3f3", -}); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -2969,7 +2996,7 @@ while (page.hasNextPage()) {
-**request:** `Hume.empathicVoice.ChatGroupsListChatGroupsRequest` +**request:** `Hume.PostedTts`
@@ -2977,7 +3004,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `ChatGroups.RequestOptions` +**requestOptions:** `Tts.RequestOptions`
@@ -2988,7 +3015,9 @@ while (page.hasNextPage()) {
-
client.empathicVoice.chatGroups.getChatGroup(id, { ...params }) -> Hume.ReturnChatGroupPagedChats +## Tts Voices + +
client.tts.voices.list({ ...params }) -> core.Page
@@ -3000,7 +3029,7 @@ while (page.hasNextPage()) {
-Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associated with the **ChatGroup**. +Lists voices you have saved in your account, or voices from the [Voice Library](https://platform.hume.ai/tts/voice-library).
@@ -3016,11 +3045,20 @@ Fetches a **ChatGroup** by ID, including a paginated list of **Chats** associate
```typescript -await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19df79f05f", { - pageNumber: 0, - pageSize: 1, - ascendingOrder: true, +const response = await client.tts.voices.list({ + provider: "CUSTOM_VOICE", +}); +for await (const item of response) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.tts.voices.list({ + provider: "CUSTOM_VOICE", }); +while (page.hasNextPage()) { + page = page.getNextPage(); +} ```
@@ -3036,15 +3074,7 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
-**id:** `string` — Identifier for a Chat Group. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ChatGroupsGetChatGroupRequest` +**request:** `Hume.tts.VoicesListRequest`
@@ -3052,7 +3082,7 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
-**requestOptions:** `ChatGroups.RequestOptions` +**requestOptions:** `Voices.RequestOptions`
@@ -3063,7 +3093,7 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
-
client.empathicVoice.chatGroups.listChatGroupEvents(id, { ...params }) -> core.Page +
client.tts.voices.create({ ...params }) -> Hume.ReturnVoice
@@ -3075,7 +3105,9 @@ await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19
-Fetches a paginated list of **Chat** events associated with a **Chat Group**. +Saves a new custom voice to your account using the specified TTS generation ID. + +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).
@@ -3091,24 +3123,10 @@ Fetches a paginated list of **Chat** events associated with a **Chat Group**.
```typescript -const response = await client.empathicVoice.chatGroups.listChatGroupEvents("697056f0-6c7e-487d-9bd8-9c19df79f05f", { - pageNumber: 0, - pageSize: 3, - ascendingOrder: true, -}); -for await (const item of response) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.empathicVoice.chatGroups.listChatGroupEvents("697056f0-6c7e-487d-9bd8-9c19df79f05f", { - pageNumber: 0, - pageSize: 3, - ascendingOrder: true, +await client.tts.voices.create({ + generationId: "795c949a-1510-4a80-9646-7d0863b023ab", + name: "David Hume", }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} ```
@@ -3124,15 +3142,7 @@ while (page.hasNextPage()) {
-**id:** `string` — Identifier for a Chat Group. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest` +**request:** `Hume.tts.PostedVoice`
@@ -3140,7 +3150,7 @@ while (page.hasNextPage()) {
-**requestOptions:** `ChatGroups.RequestOptions` +**requestOptions:** `Voices.RequestOptions`
@@ -3151,7 +3161,7 @@ while (page.hasNextPage()) {
-
client.empathicVoice.chatGroups.getAudio(id, { ...params }) -> Hume.ReturnChatGroupPagedAudioReconstructions +
client.tts.voices.delete({ ...params }) -> void
@@ -3163,7 +3173,7 @@ while (page.hasNextPage()) {
-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). +Deletes a previously generated custom voice.
@@ -3179,10 +3189,8 @@ Fetches a paginated list of audio for each **Chat** within the specified **Chat
```typescript -await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cdfc78", { - pageNumber: 0, - pageSize: 10, - ascendingOrder: true, +await client.tts.voices.delete({ + name: "David Hume", }); ``` @@ -3199,15 +3207,7 @@ await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cd
-**id:** `string` — Identifier for a Chat Group. Formatted as a UUID. - -
-
- -
-
- -**request:** `Hume.empathicVoice.ChatGroupsGetAudioRequest` +**request:** `Hume.tts.VoicesDeleteRequest`
@@ -3215,7 +3215,7 @@ await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cd
-**requestOptions:** `ChatGroups.RequestOptions` +**requestOptions:** `Voices.RequestOptions`
diff --git a/src/Client.ts b/src/Client.ts index 7a71a0e4..5501937b 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -5,8 +5,8 @@ import * as environments from "./environments.js"; import * as core from "./core/index.js"; import { mergeHeaders } from "./core/headers.js"; -import { Tts } from "./api/resources/tts/client/Client.js"; import { EmpathicVoice } from "./api/resources/empathicVoice/client/Client.js"; +import { Tts } from "./api/resources/tts/client/Client.js"; import { ExpressionMeasurement } from "./api/resources/expressionMeasurement/client/Client.js"; export declare namespace HumeClient { @@ -36,8 +36,8 @@ export declare namespace HumeClient { export class HumeClient { protected readonly _options: HumeClient.Options; - protected _tts: Tts | undefined; protected _empathicVoice: EmpathicVoice | undefined; + protected _tts: Tts | undefined; protected _expressionMeasurement: ExpressionMeasurement | undefined; constructor(_options: HumeClient.Options = {}) { @@ -47,8 +47,8 @@ export class HumeClient { { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", - "X-Fern-SDK-Version": "0.15.2", - "User-Agent": "hume/0.15.2", + "X-Fern-SDK-Version": "0.15.3", + "User-Agent": "hume/0.15.3", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, }, @@ -57,14 +57,14 @@ export class HumeClient { }; } - public get tts(): Tts { - return (this._tts ??= new Tts(this._options)); - } - public get empathicVoice(): EmpathicVoice { return (this._empathicVoice ??= new EmpathicVoice(this._options)); } + public get tts(): Tts { + return (this._tts ??= new Tts(this._options)); + } + public get expressionMeasurement(): ExpressionMeasurement { return (this._expressionMeasurement ??= new ExpressionMeasurement(this._options)); } diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts index 78a37fd4..acaf6c71 100644 --- a/src/api/resources/index.ts +++ b/src/api/resources/index.ts @@ -1,3 +1,3 @@ -export * as tts from "./tts/index.js"; export * as empathicVoice from "./empathicVoice/index.js"; +export * as tts from "./tts/index.js"; export * as expressionMeasurement from "./expressionMeasurement/index.js"; diff --git a/src/core/index.ts b/src/core/index.ts index a83ceba0..150662d8 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -3,8 +3,8 @@ export * from "./runtime/index.js"; export * as url from "./url/index.js"; export * as serialization from "./schemas/index.js"; export * from "./websocket/index.js"; -export * from "./stream/index.js"; export * from "./utils/index.js"; export * from "./pagination/index.js"; +export * from "./stream/index.js"; export * from "./form-data-utils/index.js"; export * as file from "./file/index.js"; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index 78a37fd4..acaf6c71 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -1,3 +1,3 @@ -export * as tts from "./tts/index.js"; export * as empathicVoice from "./empathicVoice/index.js"; +export * as tts from "./tts/index.js"; export * as expressionMeasurement from "./expressionMeasurement/index.js"; diff --git a/src/version.ts b/src/version.ts index 97e00518..4d012803 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "0.15.2"; +export const SDK_VERSION = "0.15.3";