Skip to content

Latest Text to Speech

List a compatible voice and synthesize audio with Simba 3.2.

This example assumes using Speechify; is in scope and apiKey contains your Speechify API key.

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

var voices = await client.Voices.ListAsync(
    limit: 50,
    model: GetSpeechRequestModel.Simba32.ToValueString());
var voice = voices.Voices.FirstOrDefault(candidate =>
    candidate.Models.Any(model => model.Name == GetVoicesModelName.Simba32));
if (voice is null)
{
    throw new AssertInconclusiveException("No Simba 3.2 voice is available to this Speechify workspace.");
}

var response = await client.Audio.SpeechAsync(
    input: "Hello from the latest Speechify speech model.",
    voiceId: voice.Id,
    language: "en-US",
    model: GetSpeechRequestModel.Simba32,
    audioFormat: GetSpeechRequestAudioFormat.Mp3);