Skip to content

Latest commit

Β 

History

History
3738 lines (2582 loc) Β· 54.5 KB

reference.md

File metadata and controls

3738 lines (2582 loc) Β· 54.5 KB

Reference

Tts

client.tts.synthesizeJson({ ...params }) -> Hume.ReturnTts

πŸ“ Description

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.

πŸ”Œ Usage

await client.tts.synthesizeJson({
    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.",
        },
    ],
    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,
});

βš™οΈ Parameters

request: Hume.PostedTts

requestOptions: Tts.RequestOptions

client.tts.synthesizeFile({ ...params }) -> stream.Readable

πŸ“ Description

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.

πŸ”Œ Usage

await client.tts.synthesizeFile({
    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.",
        },
    ],
    context: {
        generationId: "09ad914d-8e7f-40f8-a279-e34f07f7dab2",
    },
    format: {
        type: "mp3",
    },
    numGenerations: 1,
});

βš™οΈ Parameters

request: Hume.PostedTts

requestOptions: Tts.RequestOptions

client.tts.synthesizeFileStreaming({ ...params }) -> stream.Readable

πŸ“ Description

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.

πŸ”Œ Usage

await client.tts.synthesizeFileStreaming({
    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.",
        },
    ],
    context: {
        generationId: "09ad914d-8e7f-40f8-a279-e34f07f7dab2",
    },
    format: {
        type: "mp3",
    },
    numGenerations: 1,
});

βš™οΈ Parameters

request: Hume.PostedTts

requestOptions: Tts.RequestOptions

client.tts.synthesizeJsonStreaming({ ...params }) -> core.Stream

πŸ“ Description

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.

πŸ”Œ Usage

await client.tts.synthesizeJsonStreaming({
    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.",
        },
    ],
    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",
    },
});

βš™οΈ Parameters

request: Hume.PostedTts

requestOptions: Tts.RequestOptions

Tts Voices

client.tts.voices.create({ ...params }) -> Hume.ReturnVoice

πŸ“ Description

Creates a new voice from a specified TTS generation ID and saves it to your Voice Library. This allows for consistent speech style and prosody across multiple requests.

πŸ”Œ Usage

await client.tts.voices.create({
    generationId: "795c949a-1510-4a80-9646-7d0863b023ab",
    name: "David Hume",
});

βš™οΈ Parameters

request: Hume.tts.PostedVoice

requestOptions: Voices.RequestOptions

ExpressionMeasurement Batch

client.expressionMeasurement.batch.listJobs({ ...params }) -> Hume.UnionJob[]

πŸ“ Description

Sort and filter jobs.

πŸ”Œ Usage

await client.expressionMeasurement.batch.listJobs();

βš™οΈ Parameters

request: Hume.expressionMeasurement.batch.BatchListJobsRequest

requestOptions: Batch.RequestOptions

client.expressionMeasurement.batch.startInferenceJob({ ...params }) -> Hume.JobId

πŸ“ Description

Start a new measurement inference job.

πŸ”Œ Usage

await client.expressionMeasurement.batch.startInferenceJob({
    urls: ["https://hume-tutorials.s3.amazonaws.com/faces.zip"],
    notify: true,
});

βš™οΈ Parameters

request: Hume.InferenceBaseRequest

requestOptions: Batch.RequestOptions

client.expressionMeasurement.batch.getJobDetails(id) -> Hume.UnionJob

πŸ“ Description

Get the request details and state of a given job.

πŸ”Œ Usage

await client.expressionMeasurement.batch.getJobDetails("job_id");

βš™οΈ Parameters

id: string β€” The unique identifier for the job.

requestOptions: Batch.RequestOptions

client.expressionMeasurement.batch.getJobPredictions(id) -> Hume.UnionPredictResult[]

πŸ“ Description

Get the JSON predictions of a completed inference job.

πŸ”Œ Usage

await client.expressionMeasurement.batch.getJobPredictions("job_id");

βš™οΈ Parameters

id: string β€” The unique identifier for the job.

requestOptions: Batch.RequestOptions

client.expressionMeasurement.batch.startInferenceJobFromLocalFile(file, { ...params }) -> Hume.JobId

πŸ“ Description

Start a new batch inference job.

πŸ”Œ Usage

await client.expressionMeasurement.batch.startInferenceJobFromLocalFile(
    [fs.createReadStream("/path/to/your/file")],
    {}
);

βš™οΈ Parameters

file: File[] | fs.ReadStream[] | Blob[]

request: Hume.expressionMeasurement.batch.BatchStartInferenceJobFromLocalFileRequest

requestOptions: Batch.RequestOptions

EmpathicVoice Tools

client.empathicVoice.tools.listTools({ ...params }) -> core.Page

πŸ“ Description

Fetches a paginated list of Tools.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.listTools({
    pageNumber: 0,
    pageSize: 2,
});

βš™οΈ Parameters

request: Hume.empathicVoice.ToolsListToolsRequest

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.createTool({ ...params }) -> Hume.ReturnUserDefinedTool | undefined

πŸ“ Description

Creates a Tool that can be added to an EVI configuration.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

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.",
});

βš™οΈ Parameters

request: Hume.empathicVoice.PostedUserDefinedTool

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.listToolVersions(id, { ...params }) -> Hume.ReturnPagedUserDefinedTools

πŸ“ Description

Fetches a list of a Tool's versions.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.listToolVersions("00183a3f-79ba-413d-9f3b-609864268bea");

βš™οΈ Parameters

id: string β€” Identifier for a Tool. Formatted as a UUID.

request: Hume.empathicVoice.ToolsListToolVersionsRequest

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.createToolVersion(id, { ...params }) -> Hume.ReturnUserDefinedTool | undefined

πŸ“ Description

Updates a Tool by creating a new version of the Tool.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

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.",
});

βš™οΈ Parameters

id: string β€” Identifier for a Tool. Formatted as a UUID.

request: Hume.empathicVoice.PostedUserDefinedToolVersion

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.deleteTool(id) -> void

πŸ“ Description

Deletes a Tool and its versions.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.deleteTool("00183a3f-79ba-413d-9f3b-609864268bea");

βš™οΈ Parameters

id: string β€” Identifier for a Tool. Formatted as a UUID.

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.updateToolName(id, { ...params }) -> string

πŸ“ Description

Updates the name of a Tool.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.updateToolName("00183a3f-79ba-413d-9f3b-609864268bea", {
    name: "get_current_temperature",
});

βš™οΈ Parameters

id: string β€” Identifier for a Tool. Formatted as a UUID.

request: Hume.empathicVoice.PostedUserDefinedToolName

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.getToolVersion(id, version) -> Hume.ReturnUserDefinedTool | undefined

πŸ“ Description

Fetches a specified version of a Tool.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.getToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1);

βš™οΈ Parameters

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.

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.deleteToolVersion(id, version) -> void

πŸ“ Description

Deletes a specified version of a Tool.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

await client.empathicVoice.tools.deleteToolVersion("00183a3f-79ba-413d-9f3b-609864268bea", 1);

βš™οΈ Parameters

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.

requestOptions: Tools.RequestOptions

client.empathicVoice.tools.updateToolDescription(id, version, { ...params }) -> Hume.ReturnUserDefinedTool | undefined

πŸ“ Description

Updates the description of a specified Tool version.

Refer to our tool use guide for comprehensive instructions on defining and integrating tools into EVI.

πŸ”Œ Usage

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.",
});

βš™οΈ Parameters

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

requestOptions: Tools.RequestOptions

EmpathicVoice Prompts

client.empathicVoice.prompts.listPrompts({ ...params }) -> core.Page

πŸ“ Description

Fetches a paginated list of Prompts.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.listPrompts({
    pageNumber: 0,
    pageSize: 2,
});

βš™οΈ Parameters

request: Hume.empathicVoice.PromptsListPromptsRequest

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.createPrompt({ ...params }) -> Hume.ReturnPrompt | undefined

πŸ“ Description

Creates a Prompt that can be added to an EVI configuration.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.createPrompt({
    name: "Weather Assistant Prompt",
    text: "<role>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.</role>",
});

βš™οΈ Parameters

request: Hume.empathicVoice.PostedPrompt

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.listPromptVersions(id, { ...params }) -> Hume.ReturnPagedPrompts

πŸ“ Description

Fetches a list of a Prompt's versions.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-af9e5da3bac5");

βš™οΈ Parameters

id: string β€” Identifier for a Prompt. Formatted as a UUID.

request: Hume.empathicVoice.PromptsListPromptVersionsRequest

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.createPromptVersion(id, { ...params }) -> Hume.ReturnPrompt | undefined

πŸ“ Description

Updates a Prompt by creating a new version of the Prompt.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.createPromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", {
    text: "<role>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.</role>",
    versionDescription: "This is an updated version of the Weather Assistant Prompt.",
});

βš™οΈ Parameters

id: string β€” Identifier for a Prompt. Formatted as a UUID.

request: Hume.empathicVoice.PostedPromptVersion

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.deletePrompt(id) -> void

πŸ“ Description

Deletes a Prompt and its versions.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da3bac5");

βš™οΈ Parameters

id: string β€” Identifier for a Prompt. Formatted as a UUID.

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.updatePromptName(id, { ...params }) -> string

πŸ“ Description

Updates the name of a Prompt.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.updatePromptName("af699d45-2985-42cc-91b9-af9e5da3bac5", {
    name: "Updated Weather Assistant Prompt Name",
});

βš™οΈ Parameters

id: string β€” Identifier for a Prompt. Formatted as a UUID.

request: Hume.empathicVoice.PostedPromptName

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.getPromptVersion(id, version) -> Hume.ReturnPrompt | undefined

πŸ“ Description

Fetches a specified version of a Prompt.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 0);

βš™οΈ Parameters

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.

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.deletePromptVersion(id, version) -> void

πŸ“ Description

Deletes a specified version of a Prompt.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 1);

βš™οΈ Parameters

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.

requestOptions: Prompts.RequestOptions

client.empathicVoice.prompts.updatePromptDescription(id, version, { ...params }) -> Hume.ReturnPrompt | undefined

πŸ“ Description

Updates the description of a Prompt.

See our prompting guide for tips on crafting your system prompt.

πŸ”Œ Usage

await client.empathicVoice.prompts.updatePromptDescription("af699d45-2985-42cc-91b9-af9e5da3bac5", 1, {
    versionDescription: "This is an updated version_description.",
});

βš™οΈ Parameters

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

requestOptions: Prompts.RequestOptions

EmpathicVoice CustomVoices

client.empathicVoice.customVoices.listCustomVoices({ ...params }) -> Hume.ReturnPagedCustomVoices

πŸ“ Description

Fetches a paginated list of Custom Voices.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.listCustomVoices();

βš™οΈ Parameters

request: Hume.empathicVoice.CustomVoicesListCustomVoicesRequest

requestOptions: CustomVoices.RequestOptions

client.empathicVoice.customVoices.createCustomVoice({ ...params }) -> Hume.ReturnCustomVoice

πŸ“ Description

Creates a Custom Voice that can be added to an EVI configuration.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.createCustomVoice({
    name: "name",
    baseVoice: Hume.PostedCustomVoiceBaseVoice.Ito,
    parameterModel: "20241004-11parameter",
});

βš™οΈ Parameters

request: Hume.PostedCustomVoice

requestOptions: CustomVoices.RequestOptions

client.empathicVoice.customVoices.getCustomVoice(id) -> Hume.ReturnCustomVoice

πŸ“ Description

Fetches a specific Custom Voice by ID.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.getCustomVoice("id");

βš™οΈ Parameters

id: string β€” Identifier for a Custom Voice. Formatted as a UUID.

requestOptions: CustomVoices.RequestOptions

client.empathicVoice.customVoices.createCustomVoiceVersion(id, { ...params }) -> Hume.ReturnCustomVoice

πŸ“ Description

Updates a Custom Voice by creating a new version of the Custom Voice.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.createCustomVoiceVersion("id", {
    name: "name",
    baseVoice: Hume.PostedCustomVoiceBaseVoice.Ito,
    parameterModel: "20241004-11parameter",
});

βš™οΈ Parameters

id: string β€” Identifier for a Custom Voice. Formatted as a UUID.

request: Hume.PostedCustomVoice

requestOptions: CustomVoices.RequestOptions

client.empathicVoice.customVoices.deleteCustomVoice(id) -> void

πŸ“ Description

Deletes a Custom Voice and its versions.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.deleteCustomVoice("id");

βš™οΈ Parameters

id: string β€” Identifier for a Custom Voice. Formatted as a UUID.

requestOptions: CustomVoices.RequestOptions

client.empathicVoice.customVoices.updateCustomVoiceName(id, { ...params }) -> string

πŸ“ Description

Updates the name of a Custom Voice.

Refer to our voices guide for details on creating a custom voice.

πŸ”Œ Usage

await client.empathicVoice.customVoices.updateCustomVoiceName("id", {
    name: "name",
});

βš™οΈ Parameters

id: string β€” Identifier for a Custom Voice. Formatted as a UUID.

request: Hume.empathicVoice.PostedCustomVoiceName

requestOptions: CustomVoices.RequestOptions

EmpathicVoice Configs

client.empathicVoice.configs.listConfigs({ ...params }) -> Hume.ReturnPagedConfigs

πŸ“ Description

Fetches a paginated list of Configs.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.listConfigs({
    pageNumber: 0,
    pageSize: 1,
});

βš™οΈ Parameters

request: Hume.empathicVoice.ConfigsListConfigsRequest

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.createConfig({ ...params }) -> Hume.ReturnConfig

πŸ“ Description

Creates a Config which can be applied to EVI.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.createConfig({
    name: "Weather Assistant Config",
    prompt: {
        id: "af699d45-2985-42cc-91b9-af9e5da3bac5",
        version: 0,
    },
    eviVersion: "2",
    voice: {
        provider: Hume.PostedVoiceProvider.HumeAi,
        name: "SAMPLE VOICE",
    },
    languageModel: {
        modelProvider: Hume.PostedLanguageModelModelProvider.Anthropic,
        modelResource: Hume.PostedLanguageModelModelResource.Claude35Sonnet20240620,
        temperature: 1,
    },
    eventMessages: {
        onNewChat: {
            enabled: false,
            text: "",
        },
        onInactivityTimeout: {
            enabled: false,
            text: "",
        },
        onMaxDurationTimeout: {
            enabled: false,
            text: "",
        },
    },
});

βš™οΈ Parameters

request: Hume.empathicVoice.PostedConfig

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.listConfigVersions(id, { ...params }) -> Hume.ReturnPagedConfigs

πŸ“ Description

Fetches a list of a Config's versions.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.listConfigVersions("1b60e1a0-cc59-424a-8d2c-189d354db3f3");

βš™οΈ Parameters

id: string β€” Identifier for a Config. Formatted as a UUID.

request: Hume.empathicVoice.ConfigsListConfigVersionsRequest

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.createConfigVersion(id, { ...params }) -> Hume.ReturnConfig

πŸ“ Description

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.

πŸ”Œ Usage

await client.empathicVoice.configs.createConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", {
    versionDescription: "This is an updated version of the Weather Assistant Config.",
    eviVersion: "2",
    prompt: {
        id: "af699d45-2985-42cc-91b9-af9e5da3bac5",
        version: 0,
    },
    voice: {
        provider: Hume.PostedVoiceProvider.HumeAi,
        name: "ITO",
    },
    languageModel: {
        modelProvider: Hume.PostedLanguageModelModelProvider.Anthropic,
        modelResource: Hume.PostedLanguageModelModelResource.Claude35Sonnet20240620,
        temperature: 1,
    },
    ellmModel: {
        allowShortResponses: true,
    },
    eventMessages: {
        onNewChat: {
            enabled: false,
            text: "",
        },
        onInactivityTimeout: {
            enabled: false,
            text: "",
        },
        onMaxDurationTimeout: {
            enabled: false,
            text: "",
        },
    },
});

βš™οΈ Parameters

id: string β€” Identifier for a Config. Formatted as a UUID.

request: Hume.empathicVoice.PostedConfigVersion

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.deleteConfig(id) -> void

πŸ“ Description

Deletes a Config and its versions.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.deleteConfig("1b60e1a0-cc59-424a-8d2c-189d354db3f3");

βš™οΈ Parameters

id: string β€” Identifier for a Config. Formatted as a UUID.

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.updateConfigName(id, { ...params }) -> string

πŸ“ Description

Updates the name of a Config.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.updateConfigName("1b60e1a0-cc59-424a-8d2c-189d354db3f3", {
    name: "Updated Weather Assistant Config Name",
});

βš™οΈ Parameters

id: string β€” Identifier for a Config. Formatted as a UUID.

request: Hume.empathicVoice.PostedConfigName

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.getConfigVersion(id, version) -> Hume.ReturnConfig

πŸ“ Description

Fetches a specified version of a Config.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.getConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1);

βš™οΈ Parameters

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.

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.deleteConfigVersion(id, version) -> void

πŸ“ Description

Deletes a specified version of a Config.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.deleteConfigVersion("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1);

βš™οΈ Parameters

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.

requestOptions: Configs.RequestOptions

client.empathicVoice.configs.updateConfigDescription(id, version, { ...params }) -> Hume.ReturnConfig

πŸ“ Description

Updates the description of a Config.

For more details on configuration options and how to configure EVI, see our configuration guide.

πŸ”Œ Usage

await client.empathicVoice.configs.updateConfigDescription("1b60e1a0-cc59-424a-8d2c-189d354db3f3", 1, {
    versionDescription: "This is an updated version_description.",
});

βš™οΈ Parameters

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

requestOptions: Configs.RequestOptions

EmpathicVoice Chats

client.empathicVoice.chats.listChats({ ...params }) -> core.Page

πŸ“ Description

Fetches a paginated list of Chats.

πŸ”Œ Usage

await client.empathicVoice.chats.listChats({
    pageNumber: 0,
    pageSize: 1,
    ascendingOrder: true,
});

βš™οΈ Parameters

request: Hume.empathicVoice.ChatsListChatsRequest

requestOptions: Chats.RequestOptions

client.empathicVoice.chats.listChatEvents(id, { ...params }) -> core.Page

πŸ“ Description

Fetches a paginated list of Chat events.

πŸ”Œ Usage

await client.empathicVoice.chats.listChatEvents("470a49f6-1dec-4afe-8b61-035d3b2d63b0", {
    pageNumber: 0,
    pageSize: 3,
    ascendingOrder: true,
});

βš™οΈ Parameters

id: string β€” Identifier for a Chat. Formatted as a UUID.

request: Hume.empathicVoice.ChatsListChatEventsRequest

requestOptions: Chats.RequestOptions

client.empathicVoice.chats.getAudio(id) -> Hume.ReturnChatAudioReconstruction

πŸ“ Description

Fetches the audio of a previous Chat. For more details, see our guide on audio reconstruction here.

πŸ”Œ Usage

await client.empathicVoice.chats.getAudio("470a49f6-1dec-4afe-8b61-035d3b2d63b0");

βš™οΈ Parameters

id: string β€” Identifier for a chat. Formatted as a UUID.

requestOptions: Chats.RequestOptions

EmpathicVoice ChatGroups

client.empathicVoice.chatGroups.listChatGroups({ ...params }) -> Hume.ReturnPagedChatGroups

πŸ“ Description

Fetches a paginated list of Chat Groups.

πŸ”Œ Usage

await client.empathicVoice.chatGroups.listChatGroups({
    pageNumber: 0,
    pageSize: 1,
    ascendingOrder: true,
    configId: "1b60e1a0-cc59-424a-8d2c-189d354db3f3",
});

βš™οΈ Parameters

request: Hume.empathicVoice.ChatGroupsListChatGroupsRequest

requestOptions: ChatGroups.RequestOptions

client.empathicVoice.chatGroups.getChatGroup(id, { ...params }) -> Hume.ReturnChatGroupPagedChats

πŸ“ Description

Fetches a ChatGroup by ID, including a paginated list of Chats associated with the ChatGroup.

πŸ”Œ Usage

await client.empathicVoice.chatGroups.getChatGroup("697056f0-6c7e-487d-9bd8-9c19df79f05f", {
    pageNumber: 0,
    pageSize: 1,
    ascendingOrder: true,
});

βš™οΈ Parameters

id: string β€” Identifier for a Chat Group. Formatted as a UUID.

request: Hume.empathicVoice.ChatGroupsGetChatGroupRequest

requestOptions: ChatGroups.RequestOptions

client.empathicVoice.chatGroups.listChatGroupEvents(id, { ...params }) -> Hume.ReturnChatGroupPagedEvents

πŸ“ Description

Fetches a paginated list of Chat events associated with a Chat Group.

πŸ”Œ Usage

await client.empathicVoice.chatGroups.listChatGroupEvents("697056f0-6c7e-487d-9bd8-9c19df79f05f", {
    pageNumber: 0,
    pageSize: 3,
    ascendingOrder: true,
});

βš™οΈ Parameters

id: string β€” Identifier for a Chat Group. Formatted as a UUID.

request: Hume.empathicVoice.ChatGroupsListChatGroupEventsRequest

requestOptions: ChatGroups.RequestOptions

client.empathicVoice.chatGroups.getAudio(id, { ...params }) -> Hume.ReturnChatGroupPagedAudioReconstructions

πŸ“ Description

Fetches a paginated list of audio for each Chat within the specified Chat Group. For more details, see our guide on audio reconstruction here.

πŸ”Œ Usage

await client.empathicVoice.chatGroups.getAudio("369846cf-6ad5-404d-905e-a8acb5cdfc78", {
    pageNumber: 0,
    pageSize: 10,
    ascendingOrder: true,
});

βš™οΈ Parameters

id: string β€” Identifier for a Chat Group. Formatted as a UUID.

request: Hume.empathicVoice.ChatGroupsGetAudioRequest

requestOptions: ChatGroups.RequestOptions