選擇正確的模型
sunra 提供一系列語音轉文字模型以滿足不同需求。根據您對準確性和效能的要求選擇模型。 以下是一些可用選項:- elevenlabs/scribe-v1:支援 99 種語言的語音轉文字,具有單詞級時間戳和說話人分段功能——是該公司迄今最準確的 ASR。
subscribe 方法中指定其 ID,如範例所示。如需更多模型和詳細資訊,請造訪 語音轉文字模型 頁面。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
The developer site has moved to platform.sunra.ai. API endpoints, SDKs and keys are unchanged — you may just need to sign in again.
import { sunra } from "@sunra/client";
const result = await sunra.subscribe("elevenlabs/scribe-v1/speech-to-text", {
input: {
audio: 'https://assets.sunra.ai/uploads/1749243418768-74d68e25.wav',
language: 'English',
tag_audio_events: true,
speaker_diarization: false
},
logs: true,
onQueueUpdate: (update) => {
console.log(update)
},
});
console.log(result.data);
console.log(result.requestId);
import sunra_client
result = sunra_client.subscribe(
"elevenlabs/scribe-v1/speech-to-text",
arguments={
"audio": "https://assets.sunra.ai/uploads/1749243418768-74d68e25.wav",
"language": "English",
"tag_audio_events": True,
"speaker_diarization": False
},
with_logs=True,
on_enqueue=print,
on_queue_update=print,
)
print(result)
import ai.sunra.client.*;
import java.util.Map;
import com.google.gson.JsonObject;
var client = SunraClient.withEnvCredentials();
var response = client.subscribe(
"elevenlabs/scribe-v1/speech-to-text",
SubscribeOptions.<JsonObject>builder()
.input(Map.of(
"audio", "https://assets.sunra.ai/uploads/1749243418768-74d68e25.wav",
"language", "English",
"tag_audio_events", true,
"speaker_diarization", false))
.resultType(JsonObject.class)
.onQueueUpdate(update -> System.out.printf(
"\n狀態更新:%s,請求 ID:%s%n",
update.getStatus(),
update.getRequestId()
))
.logs(true)
.build()
);
System.out.println("已完成!");
System.out.println(response.getData());
curl --request POST \
--url https://api.sunra.ai/v1/queue/elevenlabs/scribe-v1/speech-to-text \
--header "Authorization: Key $SUNRA_KEY" \
--header "Content-Type: application/json" \
--data '{"audio":"https://assets.sunra.ai/uploads/1749243418768-74d68e25.wav","language":"English","tag_audio_events":true,"speaker_diarization":false}'
subscribe 方法中指定其 ID,如範例所示。如需更多模型和詳細資訊,請造訪 語音轉文字模型 頁面。