RTZR STT OpenAPI Documentation
website·Indexed 32 days ago
https://developers.rtzr.ai/docs/Developer guides for RTZR's Speech-to-Text (STT) services, featuring General STT REST APIs for audio files and Streaming STT via gRPC and WebSocket. Includes documentation on the Sommers and Korean Fine-tuned Whisper models, speaker diarization, keyword boosting, PII and profanity filtering, and authentication using OAuth2 and JWT.
What's inside RTZR
- The General STT API is an HTTP-based REST API that converts audio files into text. It supports the following audio formats: mp4, m4a, mp3, amr, flac, and wav. Access requires a JWT token issued via the authentication guide.
Understand RTZR STT concurrency-based rate limits
RTZR STT OpenAPI controls service usage based on concurrent throughput rather than time-based limits (e.g., requests per second). Limits are applied at the organization (account) level and differ between File-based STT and Streaming STT.Extract insights from STT transcription results
The Insight feature allows you to extract specific information from transcription results based on a designated perspective. This feature requires an 'enterprise' license. Ifkeywordsare configured for keyword boosting, they are also used as hints during the insight generation process.Streaming STT Overview and Connection Limits
The Streaming STT API converts real-time audio streams into text. It supports two connection methods: gRPC and WebSocket.
Critical Constraints:
- Concurrent Channels: The number of simultaneous streaming connections is subject to the platform's throughput limit policy.
- Idle Timeout: If no audio chunks are transmitted for 60 seconds after a connection is established, the server may terminate the connection.
Inquire about On-premise or Enterprise plans
For technical or pricing inquiries regarding On-premise deployment, Enterprise plans, or high-volume usage, refer to the plans section of the pricing page.Remove filler words and repetitions using the Disfluency Filter
The Disfluency Filter removes meaningless expressions (filler words) and redundant repetitions from transcribed speech to provide more concise and readable text. Examples of filtered content include hesitation markers like '음' (um), '뭐' (well), and '아' (ah), as well as stuttered or repeated words (e.g., '응응응' becomes '응').Use FINALIZE Command for AI Voice Agents
For AI Voice Agents or call bots using their own VAD (Voice Activity Detection) or turn detectors, use the
FINALIZEcommand to force the current utterance to be finalized. This allows the agent to receive the final transcript and generate a response faster without waiting for the server's end-point detection.- Behavior:
FINALIZEdoes not close the connection; you can continue sending audio for the next turn on the same connection. - Termination: To end the conversation, half-close the gRPC request stream or send an
EOStext message via WebSocket. - Important for OGG_OPUS: If using container-based encoding like
OGG_OPUS, you must start the next utterance with a new container header after aFINALIZEcommand.
- Behavior:
Authenticate with RTZR OpenAPI to get an access token
To authenticate and obtain an access token for gRPC calls, send a POST request tohttps://openapi.vito.ai/v1/authenticatewith theclient_idandclient_secretin the request body as form data. The API returns a JSON response containing theaccess_token.public static String getAccessToken() throws IOException { OkHttpClient client = new OkHttpClient(); RequestBody formBody = new FormBody.Builder() .add("client_id", "{RTZR_CLIENT_ID}") .add("client_secret", "{RTZR_CLIENT_SECRET}") .build(); Request request = new Request.Builder() .url("https://openapi.vito.ai/v1/authenticate") .post(formBody) .build(); Response response = client.newCall(request).execute(); ObjectMapper objectMapper = new ObjectMapper(); HashMap<String, String> map = objectMapper.readValue(response.body().string(), HashMap.class); return map.get("access_token"); }Implement streaming STT via WebSocket
To implement streaming STT, establish a WebSocket connection towss://openapi.vito.ai/v1/transcribe:streaming. The connection requires an authentication token passed in theAuthorization: Bearer {token}header. Audio data should be sent as binary messages. To signal the end of a stream, send a text message containingEOS.// Example connection URL with parameters u := url.URL{Scheme: "wss", Host: "openapi.vito.ai", Path: "/v1/transcribe:streaming"} query := u.Query() query.Set("sample_rate", "8000") query.Set("encoding", "LINEAR16") query.Set("use_itn", "true") query.Set("use_disfluency_filter", "true") query.Set("use_profanity_filter", "false") u.RawQuery = query.Encode()Choose between Streaming STT and File STT
While the Streaming STT API can be used to convert audio files to text, it is recommended to use the standard File STT API for non-real-time audio files as it is more convenient for that specific use case.Choose between General STT and Streaming STT integration
ReturnZero STT offers two primary integration methods based on the required latency and data flow:
- General STT: Used for uploading files and checking results via asynchronous polling (near real-time).
- Streaming STT: Used for real-time voice recognition via gRPC or WebSocket stream connections.
Authenticate for streaming STT API
Before connecting to the WebSocket, obtain an access token by sending a POST request tohttps://openapi.vito.ai/v1/authenticatewith yourclient_idandclient_secretas form data.data := map[string][]string{ "client_id": []string{ClientId}, "client_secret": []string{ClientSecret}, } resp, _ := http.PostForm("https://openapi.vito.ai/v1/authenticate", data)