Submits a Soniox async transcription job for a public audio URL and polls
until it completes. Uses the stt-async-preview model.
This example assumes using Soniox; is in scope and apiKey contains your Soniox API key.
1 2 3 4 5 6 7 8 91011121314151617
usingvarclient=newSonioxClient(apiKey);varcreated=awaitclient.Transcriptions.CreateTranscriptionAsync(model:SonioxClient.DefaultAsyncModel,audioUrl:"https://soniox.com/media/examples/coffee_shop.mp3");// Poll until the job reaches a terminal state.while(created.StatusisTranscriptionStatus.QueuedorTranscriptionStatus.Processing){awaitTask.Delay(1000);created=awaitclient.Transcriptions.GetTranscriptionAsync(created.Id);}vartranscript=awaitclient.Transcriptions.GetTranscriptionTranscriptAsync(created.Id);// Clean up to keep the workspace tidy.awaitclient.Transcriptions.DeleteTranscriptionAsync(created.Id);