Exercises the Voxtral batch transcription endpoint end-to-end by:
1. Using Mistral TTS (/v1/audio/speech) to synthesize a short utterance.
2. Feeding the resulting audio bytes into
Meai.ISpeechToTextClient.GetTextAsync (default model: voxtral-mini-2507).
3. Asserting the returned text is non-empty.
Skips when MISTRAL_API_KEY is unset or the account has no voices available.
This example assumes using Mistral; is in scope and apiKey contains your Mistral API key.
usingvarclient=newMistralClient(apiKey);VoiceListResponsevoices;try{voices=awaitclient.AudioVoices.ListAllVoicesAsync();}catch(ApiExceptionex){thrownewAssertInconclusiveException($"Mistral voice listing unavailable (HTTP {(int?)ex.StatusCode}); skipping live STT round-trip.",ex);}if(voices.Itemsisnot{Count:>0}items){thrownewAssertInconclusiveException("No voices available on this Mistral account; skipping live STT round-trip.");}varvoice=items[0];SpeechResponsespeech;try{speech=awaitclient.AudioSpeech.SpeechAsync(newSpeechRequest{Input="Hello from Voxtral.",VoiceId=voice.Id.ToString(),ResponseFormat=SpeechOutputFormat.Wav,});}catch(ApiExceptionex){thrownewAssertInconclusiveException($"Mistral TTS unavailable for this account (HTTP {(int?)ex.StatusCode}); skipping live STT round-trip.",ex);}varaudioBytes=Convert.FromBase64String(speech.AudioData);Meai.ISpeechToTextClientspeechClient=client;usingvaraudioStream=newMemoryStream(audioBytes);varresponse=awaitspeechClient.GetTextAsync(audioStream);