MCPcopy Create free account
hub / github.com/HumeAI/hume-api-examples / Example1Async

Method Example1Async

tts/tts-dotnet-quickstart/Program.cs:81–91  ·  view source on GitHub ↗

Example 1: Using a pre-existing voice. Use this method if you want to synthesize speech with a high-quality voice from Hume's Voice Library, or specify `provider: 'CUSTOM_VOICE'` to use a voice that you created previously via the Hume Platform or the API.

()

Source from the content-addressed store, hash-verified

79 /// you created previously via the Hume Platform or the API.
80 /// </summary>
81 static async Task Example1Async()
82 {
83 Console.WriteLine("Example 1: Synthesizing audio using a pre-existing voice...");
84
85 using var player = StartAudioPlayer();
86 await player.StartAsync();
87
88 await StreamAudioToPlayerAsync(_client!.Tts.SynthesizeJsonStreamingAsync(Example1RequestParams), player);
89 await player.StopAsync();
90 Console.WriteLine("Done!");
91 }
92
93 /** Example 2: Voice Design.
94 *

Callers

nothing calls this directly

Calls 2

StartAsyncMethod · 0.80
StopAsyncMethod · 0.80

Tested by

no test coverage detected