xAI: Grok Speech to Text
xAI's Grok speech-to-text: transcribes audio files in a single call or streams audio in real time over WebSocket with word-level timestamps, selected by endpoint (/v1/stt) rather than by a model parameter.
Proveedores
Distintos proveedores pueden alojar el mismo modelo. Elige un proveedor cuando necesites un backend fijo, o deja que el enrutamiento elija entre ellos.
Idiomas admitidos
Todavía no hay una lista de idiomas revisada para este modelo.
Funciones
Transcribes spoken audio to text.
speech_to_text
Real-time streaming transcription over WebSocket (wss://api.x.ai/v1/stt).
streaming
Transcribes a fully-submitted audio file in a single synchronous request.
synchronous
Supports 25 languages.
multilingual_transcription
Returns a words array with text, start, and end.
word_timestamps
Código
STT en streaming con el ElevenLabs SDK
Transmite audio del micrófono o de un archivo a través de la ruta de AllModels compatible con ElevenLabs.
import { ElevenLabsClient } from "elevenlabs";
const client = new ElevenLabsClient({
apiKey: process.env.ALLMODELS_API_KEY,
baseUrl: "https://api.allmodels.io/el"
});
const connection = await client.speechToText.realtime.connect({
modelId: "xai/grok-stt",
languageCode: "en"
}, {
queryParams: {
provider: {
"only": [
"grok"
]
}
}
});
// Send audio frames to connection, then handle transcript events.
