Skip to navigation

Getting started with Bakbak Speech-to-Text (STT)

Quick start guide for Bakbak Speech-to-Text (STT) API

View as Markdown

This guide will help you get up and running with the Bakbak STT API.

Prerequisites

  • An API key (contact your administrator)
  • HTTP client (cURL, Postman, or your preferred tool)
  • For WebSocket: a WebSocket client (e.g. wscat)

Step 1: Transcribe via HTTPS (multipart)

Send a WAV file using multipart/form-data:

curl --location 'https://hub.getraya.app/transcribe' \
-H 'X-API-Key: <YOUR_API_KEY>' \
--form 'file=@"/path/to/audio.wav"' \
--form 'language="hi"'

Response:

{
"transcript": "थैंक यू सर बस कुछ चीज़ें पूछनी थी ताकि हम कंसल्टेशन अच्छे से प्लान कर सकें आपके प्लॉट का एरिया रफली कितना होगा",
"status": "success"
}

Step 2: Transcribe via WebSocket (low latency)

  1. Connect to the WebSocket endpoint:
wscat -c "wss://hub.getraya.app/transcribe" -H "X-API-Key: <YOUR_API_KEY>"
  1. Send one JSON message per audio payload:
{
"audio_base64": "<BASE64_WAV_BYTES>",
"language": "hi"
}
  1. You will receive a JSON response like:
{
"transcript": "थैंक यू सर बस कुछ चीज़ें पूछनी थी ताकि हम कंसल्टेशन अच्छे से प्लान कर सकें आपके प्लॉट का एरिया रफली कितना होगा",
"status": "success"
}

If you want to test WSS directly from docs UI, use the API Reference → STT AsyncAPI section.

Next Steps