{}{
"type": "close"
}{
"type": "config",
"turn": {
"start_threshold": 0.8,
"eager_end_threshold": 0.4,
"end_threshold": 0.2,
"end_timeout_ms": 5600
}
}{
"type": "connected",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.start",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.update",
"transcript": "Hey can you help",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.eager_end",
"transcript": "Hey can you help me with something?",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.resume",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.end",
"transcript": "Hey can you help me with something?",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "error",
"title": "Invalid model",
"message": "The model is not valid, make sure it is a valid model ID.",
"error_code": "model_not_found",
"doc_url": "https://docs.cartesia.ai/build-with-cartesia/stt/latest",
"status_code": 400,
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}リアルタイム音声認識 (自動)
Realtime speech transcription with built-in turn detection
This endpoint is English only right now.
We expect to add more languages in the coming months.
{}{
"type": "close"
}{
"type": "config",
"turn": {
"start_threshold": 0.8,
"eager_end_threshold": 0.4,
"end_threshold": 0.2,
"end_timeout_ms": 5600
}
}{
"type": "connected",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.start",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.update",
"transcript": "Hey can you help",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.eager_end",
"transcript": "Hey can you help me with something?",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.resume",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "turn.end",
"transcript": "Hey can you help me with something?",
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}{
"type": "error",
"title": "Invalid model",
"message": "The model is not valid, make sure it is a valid model ID.",
"error_code": "model_not_found",
"doc_url": "https://docs.cartesia.ai/build-with-cartesia/stt/latest",
"status_code": 400,
"request_id": "2ff8af53-4d38-479d-8287-58940f01c701"
}Use an API key when you're calling from a trusted server.
Use a short-lived access token when calling from a browser or client app. Learn more here.
Send WebSocket binary messages containing raw audio data as specified by the encoding and sample_rate query parameters.
Audio Requirements:
- Send audio in small chunks, e.g. 100 ms
- Audio format must match the
encodingandsample_rateparameters
Send a JSON encoded close command as WebSocket text message to close the session cleanly. All buffered audio will be processed by the model into events.
Send a JSON encoded config command as a WebSocket text message to update model settings.
Fires once when the WebSocket connection is established.
You do not need to wait for this event before sending audio.
Marks the start of a user turn. Fires quickly after the user begins speaking.
This event can be used to interrupt your agent to avoid talking over the user.
Fires repeatedly as the model transcribes the current user turn.
Fires when the model predicts that the user might be done speaking.
Fires after turn.eager_end if the user turn has not actually ended.
Marks the end of a user turn.
Error information for STT WebSocket connections.
Was this page helpful?