Fun-ASR Realtime is Alibaba's streaming speech recognition model: audio is streamed in over a persistent connection and text is streamed back with low latency, with no cap on stream duration.
Streaming transcription is billed by connection time, including silence; close the connection when finished. The catalog does not publish the runtime connection rate.
Rates by prompt length
The whole request uses the rate for its input-length tier. Prices are USD per million tokens.
| Input tokens | Input | Output | Thinking input |
|---|
Specs & limits
Audio
| Languages | Multilingual with dialects, 30 languages: Chinese (Mandarin, Cantonese, Wu, Hokkien, Hakka, Gan, Xiang, Jin plus regional accents), English, Japanese, Korean, Vietnamese, Thai, Indonesian, Malay, Filipino, Hindi, Arabic, French, German, Spanish, Portuguese, Russian, Italian, Dutch, Swedish, Danish, Finnish, Norwegian, Greek, Polish, Czech, Hungarian, Romanian, Bulgarian, Croatian, Slovak |
|---|---|
| Audio limits |
|
| Speaker diarization | No |
| Streaming transcription | Yes |
| Timestamps | Yes |
Model
| Modalities | audio → text |
|---|
Docs also describe 7-state emotion recognition on the realtime guide.
Use Fun-ASR Realtime in 30 seconds
Binary PCM over WebSocket: send audio frames and read partial/final transcript events. WS /v1/audio/transcriptions/stream
# pip install websockets
# Prepare mono 16-bit little-endian PCM at 16 kHz:
# ffmpeg -i meeting.wav -f s16le -ac 1 -ar 16000 audio.pcm
import asyncio, contextlib, json, os
import websockets
MODEL = "fun-asr-realtime"
URL = "wss://synthorai.io/v1/audio/transcriptions/stream?model=" + MODEL + "&format=pcm&sample_rate=16000&bits=16&channels=1"
async def receive(ws):
async for raw in ws:
event = json.loads(raw)
if event["type"] in ("partial", "final"):
print(event["type"], event.get("text", ""))
elif event["type"] == "error":
raise RuntimeError(event.get("error", "ASR failed"))
elif event["type"] == "done":
return
async def main():
async with websockets.connect(URL, additional_headers={
"Authorization": "Bearer " + os.environ["SYNTHORAI_API_KEY"],
}, open_timeout=15, close_timeout=5) as ws:
reader = asyncio.create_task(receive(ws))
try:
with open("audio.pcm", "rb") as audio:
while frame := audio.read(3200): # 100 ms, sent at real-time speed
if reader.done():
await reader
return
await ws.send(frame) # binary PCM, not JSON/base64
await asyncio.sleep(len(frame) / 32000)
# No text finish message is supported. Allow a bounded receive window,
# then close normally; a trailing final transcript is not guaranteed.
await asyncio.sleep(1)
await ws.close(code=1000)
await reader
finally:
reader.cancel()
with contextlib.suppress(asyncio.CancelledError):
await reader
asyncio.run(main())// npm install ws; prepare 16 kHz mono PCM16 in audio.pcm.
import WebSocket from "ws";
import { open } from "node:fs/promises";
import { setTimeout as delay } from "node:timers/promises";
const model = "fun-asr-realtime";
const ws = new WebSocket("wss://synthorai.io/v1/audio/transcriptions/stream?model=" + model + "&format=pcm&sample_rate=16000&bits=16&channels=1", {
headers: { Authorization: `Bearer ${process.env.SYNTHORAI_API_KEY}` },
handshakeTimeout: 15_000,
});
ws.on("message", raw => {
const event = JSON.parse(raw.toString());
if (event.type === "partial" || event.type === "final") console.log(event.type, event.text);
if (event.type === "error") { console.error(event.error); ws.close(1000); }
if (event.type === "done") ws.close(1000);
});
ws.on("error", error => console.error(error));
ws.on("open", async () => {
const audio = await open("audio.pcm", "r");
try {
const frame = Buffer.alloc(3200); // 100 ms of mono PCM16 at 16 kHz
while (ws.readyState === WebSocket.OPEN) {
const { bytesRead } = await audio.read(frame, 0, frame.length, null);
if (!bytesRead) break;
await new Promise<void>((resolve, reject) => ws.send(frame.subarray(0, bytesRead),
{ binary: true }, error => error ? reject(error) : resolve()));
await delay(bytesRead / 32);
}
// Text finish messages are ignored. Bounded receive window, then normal close;
// the protocol does not guarantee the trailing final transcript after close.
await delay(1000);
ws.close(1000);
} catch (error) {
console.error(error);
ws.close(1000);
} finally {
await audio.close();
}
});# cURL cannot send this binary-PCM WebSocket conversation.
# Run this shell example with Python and the websockets package instead.
python3 - <<'PY'
# pip install websockets
# Prepare mono 16-bit little-endian PCM at 16 kHz:
# ffmpeg -i meeting.wav -f s16le -ac 1 -ar 16000 audio.pcm
import asyncio, contextlib, json, os
import websockets
MODEL = "fun-asr-realtime"
URL = "wss://synthorai.io/v1/audio/transcriptions/stream?model=" + MODEL + "&format=pcm&sample_rate=16000&bits=16&channels=1"
async def receive(ws):
async for raw in ws:
event = json.loads(raw)
if event["type"] in ("partial", "final"):
print(event["type"], event.get("text", ""))
elif event["type"] == "error":
raise RuntimeError(event.get("error", "ASR failed"))
elif event["type"] == "done":
return
async def main():
async with websockets.connect(URL, additional_headers={
"Authorization": "Bearer " + os.environ["SYNTHORAI_API_KEY"],
}, open_timeout=15, close_timeout=5) as ws:
reader = asyncio.create_task(receive(ws))
try:
with open("audio.pcm", "rb") as audio:
while frame := audio.read(3200): # 100 ms, sent at real-time speed
if reader.done():
await reader
return
await ws.send(frame) # binary PCM, not JSON/base64
await asyncio.sleep(len(frame) / 32000)
# No text finish message is supported. Allow a bounded receive window,
# then close normally; a trailing final transcript is not guaranteed.
await asyncio.sleep(1)
await ws.close(code=1000)
await reader
finally:
reader.cancel()
with contextlib.suppress(asyncio.CancelledError):
await reader
asyncio.run(main())
PYpackage main
// go get github.com/gorilla/websocket
// Prepare 16 kHz mono PCM16 in audio.pcm before running.
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"time"
"github.com/gorilla/websocket"
)
func main() {
model := "fun-asr-realtime"
headers := http.Header{}
headers.Set("Authorization", "Bearer " + os.Getenv("SYNTHORAI_API_KEY"))
dialer := websocket.Dialer{HandshakeTimeout: 15 * time.Second}
ws, _, err := dialer.Dial("wss://synthorai.io/v1/audio/transcriptions/stream?model=" + model + "&format=pcm&sample_rate=16000&bits=16&channels=1", headers)
if err != nil { panic(err) }
defer ws.Close()
done := make(chan struct{})
go func() {
defer close(done)
for {
_, raw, err := ws.ReadMessage()
if err != nil { return }
var event struct { Type string; Text string; Error string }
if err := json.Unmarshal(raw, &event); err != nil { return }
switch event.Type {
case "partial", "final": fmt.Println(event.Type, event.Text)
case "error": fmt.Println(event.Error); return
case "done": return
}
}
}()
audio, err := os.Open("audio.pcm")
if err != nil { panic(err) }
defer audio.Close()
frame := make([]byte, 3200)
for {
select { case <-done: return; default: }
n, err := audio.Read(frame)
if err != nil && err != io.EOF { panic(err) }
if n == 0 { break }
ws.SetWriteDeadline(time.Now().Add(10 * time.Second))
if err := ws.WriteMessage(websocket.BinaryMessage, frame[:n]); err != nil { panic(err) }
time.Sleep(time.Duration(n) * time.Second / 32000)
}
// No text finish message: bounded receive window, then close normally.
// A trailing final transcript after close is not guaranteed.
select { case <-done: return; case <-time.After(time.Second): }
ws.WriteControl(websocket.CloseMessage, websocket.FormatCloseMessage(1000, ""), time.Now().Add(time.Second))
select { case <-done: case <-time.After(2 * time.Second): }
}import java.net.URI;
import java.net.http.*;
import java.nio.ByteBuffer;
import java.nio.file.*;
import java.util.concurrent.*;
// Prepare 16 kHz mono PCM16 in audio.pcm before running.
class StreamingAsrExample {
public static void main(String[] args) throws Exception {
String model = "fun-asr-realtime";
var closed = new CompletableFuture<Void>();
var listener = new WebSocket.Listener() {
private final StringBuilder message = new StringBuilder();
public void onOpen(WebSocket ws) { ws.request(1); }
public CompletionStage<?> onText(WebSocket ws, CharSequence data, boolean last) {
message.append(data);
if (last) {
// Normalized JSON event types: partial, final, error, done; transcript is text.
System.out.println(message);
message.setLength(0);
}
ws.request(1);
return null;
}
public CompletionStage<?> onClose(WebSocket ws, int status, String reason) {
closed.complete(null); return null;
}
public void onError(WebSocket ws, Throwable error) { closed.completeExceptionally(error); }
};
var ws = HttpClient.newHttpClient().newWebSocketBuilder()
.connectTimeout(java.time.Duration.ofSeconds(15))
.header("Authorization", "Bearer " + System.getenv("SYNTHORAI_API_KEY"))
.buildAsync(URI.create("wss://synthorai.io/v1/audio/transcriptions/stream?model=" + model + "&format=pcm&sample_rate=16000&bits=16&channels=1"), listener).join();
try (var audio = Files.newInputStream(Path.of("audio.pcm"))) {
byte[] frame = new byte[3200];
int size;
while (!closed.isDone() && (size = audio.read(frame)) != -1) {
ws.sendBinary(ByteBuffer.wrap(java.util.Arrays.copyOf(frame, size)), true).join();
Thread.sleep(Math.max(1, size / 32));
}
// Text finish messages are ignored. Bounded receive window, then close;
// a trailing final transcript after close is not guaranteed.
Thread.sleep(1000);
ws.sendClose(1000, "").join();
closed.get(2, TimeUnit.SECONDS);
} finally { ws.abort(); }
}
}About Fun-ASR Realtime
- The official docs position it for live captions, voice assistants, and meeting transcription, and it carries the Fun-ASR family's strengths of hotword customization plus multilingual coverage including Chinese regional dialects, English, Japanese, and Korean.
- The realtime surface adds controls the file-based models do not need: semantic punctuation, punctuation prediction on by default, an adjustable maximum sentence silence that decides when an utterance is closed, a speech-noise threshold for tuning against background sound, and word-level timestamps emitted as the stream runs.
- Audio arrives as PCM, WAV, MP3, Opus, Speex, AAC or AMR at 8 or 16 kHz.
- Two limits are worth designing around: speaker diarization is not available on the realtime path (for who-said-what you need the recording-file models), and language coverage varies sharply by dated snapshot rather than being uniform across the family, so pin the snapshot your language set depends on.
- Emotion labelling, the Qwen3-ASR line's differentiator, is not offered here either, and context-based accuracy tuning is available only on some snapshots.
- Synthorai makes it callable through the same OpenAI-compatible interface used for the rest of its audio catalog.
FAQ
Is the Fun-ASR Realtime API free to try?
Yes: new accounts get 10 trial calls and up to $1 in free credit, no card required. That's enough to try Fun-ASR Realtime against your real workload before adding a payment method.
What is Fun-ASR Realtime best at?
Streaming transcription with no duration cap; built for live captions and meetings; hotword customization with multilingual coverage. See the About section for the full picture from the vendor's own release notes.
How much does Fun-ASR Realtime cost?
Streaming transcription is billed by connection time, including silence; close the connection when finished. The catalog does not publish the runtime connection rate.
Which languages does Fun-ASR Realtime support?
Fun-ASR Realtime supports Multilingual with dialects, 30 languages: Chinese (Mandarin, Cantonese, Wu, Hokkien, Hakka, Gan, Xiang, Jin plus regional accents), English, Japanese, Korean, Vietnamese, Thai, Indonesian, Malay, Filipino, Hindi, Arabic, French, German, Spanish, Portuguese, Russian, Italian, Dutch, Swedish, Danish, Finnish, Norwegian, Greek, Polish, Czech, Hungarian, Romanian, Bulgarian, Croatian, Slovak. On Synthorai you call it through POST /v1/audio/transcriptions, the OpenAI transcription API shape.
How do I get access to Fun-ASR Realtime?
Call /v1/audio/transcriptions/stream with Fun-ASR Realtime and a Synthorai API key. Follow the integration example on this page.
Related models
Compare
Specifications and vendor benchmarks link to their sources. Gateway support describes the Synthorai implementation. Archived examples are individual gateway requests, not a guarantee of general model performance. Prices use the public feed or its build snapshot.