Hear developer guide
Transcribe noisy Hindi-English calls into Roman Hinglish
Transcribe a Hindi or Hinglish phone recording
API v1 recipe · reviewed 20 November 2026. Input: an authorized 8 kHz WAV call recording. Output: a saved job ID and timestamped transcript; speaker labels when available.
Keep the original 8 kHz audio and an accurate WAV header. For mono audio with several speakers, request diarization. For a stereo recording with one participant per channel, replace diarize=true with channel=true; do not request both.
Before submitting, inspect GET /v1/me on your backend and confirm the expected project, environment, credit, limits and the hear:transcribe and transcribe:jobs scopes. Supply the key privately through your server environment. Agree a usage budget and retention policy; this is cloud transcription.
For mixed Hindi-English speech, the example leaves the recognition language unset so Hear can detect it. For a known Hindi recording, add -F transcription_language=hi. The async language field controls Recap summarization, not recognition. The example requests Roman Hinglish with output_script=latin. Omit that field to keep the original writing system.
Set TRANSCRIPTION_REQUEST_ID to a unique identifier for this recording and these options. Upload the local WAV directly to PyAI after authorization. This multipart request needs no public URL. If the file must stay on the device, stop here.
curl --fail-with-body -sS https://api.pyai.com/v1/transcription/jobs \
-H "Authorization: Bearer $PYAI_API_KEY" \
-H "Idempotency-Key: $TRANSCRIPTION_REQUEST_ID" \
-F audio=@call-hi-8khz.wav \
-F output_script=latin \
-F diarize=true \
-F output_formats=jsonSave the returned job_id. Read GET /v1/transcription/jobs/{job_id} with the same server credential until completed, failed or cancelled, using bounded polling. Stop on an error. If submission is uncertain, reconcile the original request with the same idempotency key; do not create a second job.
On completion, read result.text, result.words and result.segments, or download the signed result_url when the result is offloaded. Word and segment offsets are seconds on the decoded source timeline. Inspect each segment’s speaker: a completed job can fall back to a transcript without speaker labels. Labels distinguish turns within a recording, not verified identities. Synchronous verbose_json alone does not guarantee word timings.
Review Hindi-English switches, names, numbers and negations against the original audio. See the recorded Hinglish test results for an invoice amount Hear misheard in noise. For live captions, use the Hear streaming guide with mono PCM16 at 8 kHz; decode carrier G.711 before sending it. Live streaming does not provide the async speaker-label contract.
Async uploaded audio may be retained for up to 7 days and results for up to 30 days. URL inputs may also have recovery chunks stored. There is no store: false option, and cancelling a job does not erase its data. Check the job contract and retention terms and current Hear billing before uploading.
What Hear returned on two recordings
A noisy Hinglish invoice
On 21 October 2026, Hear transcribed a 28.4-second synthetic Hindi-English recording. The mono WAV was sampled at 24 kHz. Added background noise matched the level of active speech (0 dB signal-to-noise ratio).
- Reference script excerpt
- Quantity चौबीस है और invoice एक हज़ार चार सौ निन्यानवे रुपये का है।
- Returned transcript excerpt
- Quantity 24. ऑल इनवॉइस इस 2,400 न्यूनतम रेटिंग है।
Hear preserved the quantity of 24 and changed the invoice amount from 1,499 to 2,400. For amounts, names and reference numbers, use the word timestamps to locate the passage and check it against the recording.
Roman text, word times and stereo channels
On 17 November 2026, a separate async API job processed a 20.18-second, 16 kHz stereo WAV assembled from Hindi and English clips in Google’s FLEURS dataset. The request used channel=true and output_script=latin. Hear returned 62 word entries with start and end times and 23 segments. The displayed text used Latin letters, the source text retained Hindi script, and channel IDs 0 and 1 were present.
Channel IDs identify the two audio tracks. Speaker-label accuracy on a noisy 8 kHz mono call remains unmeasured here. Evaluate the speaker changes and code-switched words on a recording representative of your callers.
Hindi transcription questions
Can I transcribe mixed Hindi-English speech?
For mixed Hindi-English speech, omit transcription_language so recognition can detect the language. A supported language code is not a Hinglish accuracy guarantee.
Will every completed job include speaker labels?
A completed job can fall back to a transcript without speaker labels. Labels distinguish turns within a recording, not verified identities.