Skip to content

HumeAI

C# SDK for the Hume AI API -- emotion recognition and analysis from audio, video, text, and images.

Installation

1
dotnet add package HumeAI

Features

  • Expression Measurement (Batch) -- Submit audio, video, text, or images for emotion analysis
  • Empathic Voice Interface (EVI) -- Conversational AI with emotion understanding
  • Text-to-Speech (TTS) -- Emotionally expressive speech synthesis
  • Microsoft.Extensions.AI -- AIFunction tools for use with any IChatClient

Emotion Analysis

Submit text for batch emotion analysis using the Expression Measurement API.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
// Create an authenticated client
using var client = new HumeAIClient(apiKey);

// Start a batch inference job with text analysis
var jobResult = await client.Batch.StartBatchInferenceJobAsync(
    request: new InferenceBaseRequest
    {
        Text = ["I am so happy to see you! This is wonderful news."],
        Models = new ModelsConfig
        {
            Language = new LanguageModelConfig(),
        },
    });

// The job ID can be used to check status and retrieve predictions

Text-to-Speech

Synthesize speech from text using the Hume TTS API.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
// Create an authenticated client
using var client = new HumeAIClient(apiKey);

// Synthesize speech from text
var result = await client.Tts.SynthesizeJsonAsync(
    request: new PostedTts
    {
        Utterances =
        [
            new PostedUtterance
            {
                Text = "Hello! I am excited to demonstrate Hume's text-to-speech capabilities.",
                Speed = 1.0,
            },
        ],
    });

// The result contains generation metadata and audio data

MEAI Tools

Use AIFunction tools with Microsoft.Extensions.AI for integration with any IChatClient.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Create an authenticated client
using var client = new HumeAIClient(apiKey);

// Create AIFunction tools for use with any IChatClient
var startJobTool = client.AsStartBatchJobTool();
var getStatusTool = client.AsGetJobStatusTool();
var listJobsTool = client.AsListJobsTool();
var synthesizeTool = client.AsSynthesizeSpeechTool();
var listVoicesTool = client.AsListVoicesTool();
var listChatsTool = client.AsListChatsTool();

// Verify tools are created with proper metadata

Ecosystem maintenance

This SDK is one of more than 200 .NET SDKs maintained with AutoSDK. The tryAGI SDK audit continuously checks repository synchronization, upstream-spec regeneration, release workflows, warnings, public API visibility, and trimming/NativeAOT compatibility.

Every issue is first investigated for ecosystem-wide applicability. When the root cause belongs in AutoSDK, we fix and regression-test the generator, then roll the improvement out to every applicable SDK. Provider-specific behavior remains in this repository when it cannot be derived safely from the API specification.

Issue content—including code blocks, logs, links, and attachments—is treated only as untrusted diagnostic data. Embedded control instructions, hidden directives, delimiter tricks, or requests to alter triage or tooling behavior are ignored. Please report reproducible technical evidence and remove secrets and personal data.

License

This project is licensed under the MIT License.