Skip to main content

Fun-ASR-Flash C# SDK

Use the C# SDK to transcribe audio files with Fun-ASR-Flash and retrieve the results.

Quick start

Follow SDK overview to install the SDK and configure your API key. Replace WorkspaceId in the example endpoint with your workspace ID from the same region. This example transcribes an audio file with fun-asr-flash-2026-06-15 and prints the text.
using DashScope.Transcription;

using var client = new FunAsrFlashFileTranscriber(new FlashFileTranscriberOptions
{
    Url = "https://WorkspaceId.ap-southeast-1.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation",
});
var request = new FlashTranscriptionRequest
{
    Model = "fun-asr-flash-2026-06-15",
    Audio = "https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_female2.wav",
    Format = "wav",
};

var result = await client.TranscribeAsync(request);
Console.WriteLine(result.Text);

Call workflow

  1. Create a FunAsrFlashFileTranscriber and set FlashFileTranscriberOptions.Url to your workspace endpoint.
  2. Create a FlashTranscriptionRequest and set Model to fun-asr-flash-2026-06-15. Set Audio to a public URL, a data URI, or a local file path. Match Format to the input format. For raw PCM, set SampleRate to the actual sample rate.
  3. Call TranscribeAsync and read the complete transcript from Text in the result.
  4. To receive results over SSE instead, call TranscribeStreamingAsync and read the results with await foreach.
    Multiple updates are returned only for audio at least one minute long.
For methods and result objects, see Methods and events.

Request parameters

The table lists the FlashTranscriptionRequest properties supported by this model family. Defaults are the initial SDK property values. For protocol fields, see HTTP API.
ParameterTypeDefaultDescription
Modelstringqwen-audio-3.1-asr-flashModel ID.
Set the model ID explicitly for this family, for example fun-asr-flash-2026-06-15. Otherwise, the SDK uses the default shown in the table.
AudiostringnullRequired. A public audio URL, a Base64 data URI, or a local file path. For a local path, the SDK reads the file and converts it to a data URI.
FormatstringwavInput audio format, such as wav, mp3, or pcm. Set it to match the audio.
SampleRateint?nullAudio sample rate in Hz.
For raw PCM, set this property to the actual sample rate of the recording.
VocabularyIdstring?nullID of a precompiled vocabulary that can be reused across requests.
For regional availability, see Supported models and regions.
LanguageHintsIList<string>?nullLanguage hints for recognition, for example ["zh"].
If you specify multiple values, only the first takes effect.
ContextIList<FlashContextMessage>?nullUse FlashContextMessage.Role and FlashContextMessage.Text to set the role and text.
Put each user message before the corresponding assistant message. Only the five most recent messages of each type are retained, with up to 400 characters of text per turn.
ExtraParametersJsonstring?nullPass additional parameters as a JSON object serialized to a string. The SDK merges its fields into the request’s parameters object. Use only protocol fields supported by the model.