Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.
The ringglabs Python SDK sends a complete audio file in one REST request, or streams live audio over a WebSocket and returns transcripts while the speaker talks; every feature works with both a synchronous Client and an AsyncClient.Parrot is in beta: SDK v0.1.x, MIT licence, Python 3.10 or later. Parameters and event fields can change before general availability.
Feature
Support
Languages
Hindi (hi, the default) and English (en)
File formats
WAV, MP3, FLAC, M4A
File size
Up to 10 MB per file
Streaming audio
Raw mono PCM, 8,000 to 48,000 Hz, int16, linear16, int32 or float32
Billing
A streaming rate per hour of audio, in your workspace currency; see the Pricing tab below
Sidebar → Labs → STT (page heading Speech To Text, marked BETA) transcribes without code and shows your usage. Its API docs button opens the SDK on PyPI. The page has four tabs:
Tab
What it holds
Quick start
The try-it panel and the install, key and first-call steps below
Logs
Every request, 50 per page
Usage
Total requests, Audio processed, Credits used, and Daily credit usage for the past 14 days
Pricing
Your Streaming rate per hour, the 30 included concurrent streams, and Contact sales for more
Logs lists Request ID, Timestamp, Duration, Mode, Credits and Status, filtered by Status (In progress, Done, Failed), Mode (Streaming, On Final, REST) and a date range. Click a row to open the STT Request drawer with the request’s Parameters and Latency.In the try-it panel, pick Language (English or Hindi; Hindi is the default), switch Punctuation on if you want capitalisation and punctuation (off by default here; the SDK defaults it to on), then Upload file (WAV, MP3, FLAC or M4A, up to 10 MB) or Transcribe live from your microphone. The result shows on Transcription; Code shows the same request as TypeScript, Python and cURL.
The video ends at the API key the SDK needs; the steps below start there.
A tour of the STT page: file upload, then the Logs, Usage and Pricing tabs and the API key
1
Install
Add the SDK to your environment:
pip install ringglabs
2
Get an API key
The SDK uses your workspace API key, generated under Settings → API key. Store it as RINGG_API_KEY.The workspace needs at least one minute of credit to start a transcription.
The key is shown once, when generated
3
First call
Transcribe a local audio file:
import osfrom ringglabs.stt import Clientwith Client(api_key=os.environ["RINGG_API_KEY"]) as client: result = client.transcribe("sample.wav", language="en") print(result.transcription)
Pick the example that matches your audio source and execution model. The streaming examples read a WAV file and send it in 20 ms chunks, using two helpers from Audio helpers; for live audio, send each chunk as it is captured instead (20 to 40 ms chunks work best).
Sync stream
Async stream
On-final
Offline
Bytes / IO
import osfrom ringglabs.stt import Client, TimeoutError as SdkTimeoutErrorfrom audio_helpers import load_wav_mono_int16_16k, iter_pcm_chunkssample_rate, audio = load_wav_mono_int16_16k("sample.wav")transcripts = []with Client(api_key=os.environ["RINGG_API_KEY"]) as client, client.stream( sample_rate=sample_rate, encoding="int16", language="en", mode="stream", enable_cap_punc=True,) as session: for chunk in iter_pcm_chunks(audio, sample_rate, 20): session.send_audio(chunk) session.end() try: for event in session.events(): if event.type == "transcript" and event.transcription.strip(): transcripts.append(event.transcription.strip()) except SdkTimeoutError: passprint(transcripts)
import asyncioimport osfrom ringglabs.stt import AsyncClient, TimeoutError as SdkTimeoutErrorfrom audio_helpers import load_wav_mono_int16_16k, iter_pcm_chunksasync def main(): sample_rate, audio = load_wav_mono_int16_16k("sample.wav") async with AsyncClient(api_key=os.environ["RINGG_API_KEY"]) as client, client.stream( sample_rate=sample_rate, encoding="int16", language="en", mode="stream", enable_cap_punc=True, ) as session: for chunk in iter_pcm_chunks(audio, sample_rate, 20): await session.send_audio(chunk) await session.end() try: async for event in session.events(): if event.type == "transcript": print(event.transcription) except SdkTimeoutError: passasyncio.run(main())
import osfrom ringglabs.stt import Client, TimeoutError as SdkTimeoutErrorfrom audio_helpers import load_wav_mono_int16_16k, iter_pcm_chunkssample_rate, audio = load_wav_mono_int16_16k("sample.wav")partials, finals = [], []with Client(api_key=os.environ["RINGG_API_KEY"]) as client, client.stream( sample_rate=sample_rate, encoding="int16", language="en", mode="on_final", accept_client_vad_events=True,) as session: session.start_speaking() for chunk in iter_pcm_chunks(audio, sample_rate, 20): session.send_audio(chunk) session.stop_speaking() session.end() try: for event in session.events(): if event.type != "transcript": continue text = event.transcription.strip() (finals if event.is_final else partials).append(text) except SdkTimeoutError: passprint(finals)
import osfrom ringglabs.stt import Clientwith Client(api_key=os.environ["RINGG_API_KEY"]) as client: result = client.transcribe( "sample.wav", language="en", enable_cap_punc=True, ) print(result.request_id, result.transcription)
Client(...) and AsyncClient(...) share the same constructor. Both can be used as context managers (with / async with), which close the underlying connections on exit.
Parameter
Default
Description
base_url
"prod-api.ringg.ai"
Host name.
api_key
None
Default API key for all requests; can be overridden per call.
Open a streaming session, send audio chunks, and receive transcript events. Use it as a context manager so the session is opened on entry and closed on exit.
Parameter
Default
Description
sample_rate
16000
Audio sample rate in Hz, from 8000 to 48000.
encoding
"int16"
int16, linear16, float32, or int32. Audio must be raw mono PCM with no file header.
language
"hi"
Language hint: "hi" or "en".
mode
"stream"
"stream" or "on_final". See below.
vad_tail_sil_ms
200
Server tail silence in ms: how long a pause ends a segment.
vad_confidence
0.55
Server VAD confidence threshold.
enable_cap_punc
True
Capitalization / punctuation.
accept_client_vad_events
False
Enables start_speaking() / stop_speaking(). Only applies in on_final mode.
stream: the server detects pauses with its own voice activity detection (VAD) and sends a final transcript event for each spoken segment. Join the segments to build the full transcript. The session’s closing transcript event can have an empty transcription, so skip blank ones.
on_final: you mark each turn with start_speaking() and stop_speaking() (requires accept_client_vad_events=True). The server sends partial transcripts (is_final=False) that grow as the turn continues, then one final transcript (is_final=True) after stop_speaking().
Once, when the session opens. Confirms the effective settings and the session’s request_id. The SDK reads it during the handshake and exposes it as session.ready_event.
transcript
A transcription result. See the fields below.
ack
Acknowledges a VAD event or end. ack_for names the message and state gives the result.
pong
Reply to ping(), with a server timestamp.
error
The server rejected a message or ended the session. Read code and detail.
All SDK exceptions are importable from ringglabs.stt and inherit from RinggLabsError.
Exception
Raised when
ValidationError
An argument is invalid, for example a file path that doesn’t exist.
ApiError
The server returns an error. Has message, status_code, code, and payload.
AuthenticationError
The API key is missing or invalid (401), or the workspace doesn’t have enough credit (402). Subclass of ApiError.
TransportError
A network failure.
TimeoutError
A request or receive exceeded its timeout. Subclass of TransportError.
ProtocolError
The server sent a malformed or unexpected message.
A file over 10 MB is rejected with an ApiError (status_code=413), and a file in another format with status_code=415 (codeUNSUPPORTED_AUDIO_FORMAT). A streaming session ends after one hour with the error code MAX_DURATION_EXCEEDED, and after 5 minutes without a message from the client with SESSION_TIMEOUT.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Ringg AI","description":"Build AI agents that make and answer phone calls, talk on your website and chat on WhatsApp, then run them from the Ringg AI dashboard or REST API.","colors":{"primary":"#0A0A0B","light":"#FFFFFF","dark":"#0A0A0B"},"logo":{"light":"https://mintcdn.com/ringgai-0da73d20/ZLVFI55VhZ4gmYrF/logo/light.svg?fit=max\u0026auto=format\u0026n=ZLVFI55VhZ4gmYrF\u0026q=85\u0026s=053f22dbaf5140cd8e5dadb1d4d057cd","dark":"https://mintcdn.com/ringgai-0da73d20/ZLVFI55VhZ4gmYrF/logo/dark.svg?fit=max\u0026auto=format\u0026n=ZLVFI55VhZ4gmYrF\u0026q=85\u0026s=cf9075384ec572e1a19b939d5a8674af","href":"https://www.ringg.ai"},"favicon":"https://mintcdn.com/ringgai-0da73d20/ZLVFI55VhZ4gmYrF/favicon.svg?fit=max\u0026auto=format\u0026n=ZLVFI55VhZ4gmYrF\u0026q=85\u0026s=e612fcf76df43d6468baa340dc3fde50","api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]},"mdx":{"auth":{"method":"key","name":"X-API-KEY"},"server":"https://prod-api.ringg.ai/ca/api/v0"}},"appearance":{"default":"dark"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"/resources/learn/all-lessons","label":"Learn"},{"href":"mailto:admin@ringg.ai","label":"Contact us"}],"primary":{"type":"button","label":"Dashboard","href":"https://www.ringg.ai/dashboard"}},"footer":{"socials":{"x":"https://x.com/ringg_ai","linkedin":"https://www.linkedin.com/company/ringg","youtube":"https://www.youtube.com/@RinggAI","instagram":"https://www.instagram.com/ringg_ai","discord":"https://discord.gg/YuEnb8Vsca"},"links":[{"header":"For AI agents","items":[{"label":"llms.txt","href":"https://docs.ringg.ai/llms.txt"},{"label":"skill.md","href":"https://docs.ringg.ai/skill.md"},{"label":"OpenAPI spec","href":"https://docs.ringg.ai/api-reference/openapi.json"},{"label":"MCP server","href":"/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants"}]}]},"search":{"prompt":"Search the docs"},"seo":{"metatags":{"canonical":"https://docs.ringg.ai","og:site_name":"Ringg AI Docs","twitter:site":"@ringg_ai"},"organization":{"id":"https://www.ringg.ai/#organization","legalName":"Stoic AI Private Limited","url":"https://www.ringg.ai","logo":"https://assets.ringg.ai/images/logo/logo.svg","sameAs":["https://x.com/ringg_ai","https://www.linkedin.com/company/ringg","https://www.youtube.com/@RinggAI","https://www.instagram.com/ringg_ai","https://discord.gg/YuEnb8Vsca"]}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":false},"errors":{"404":{"redirect":false,"title":"This page doesn't exist","description":"It may have moved in the docs rebuild. The suggestions below usually have it; otherwise start from [the introduction](/get-started/ringg-ai) or search above."}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","download-spec"],"display":"header"},"markdown":{"instructions":["To search or read these docs, connect the Ringg docs MCP server at https://docs.ringg.ai/mcp (no key needed; tools search_ringg_ai and query_docs_filesystem_ringg_ai) instead of browsing pages one by one. Setup for each client: https://docs.ringg.ai/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants.md","The dashboard labels agents \"Assistants\"; these docs say \"agent\". Both mean the same object, identified by agent_id.","API base URL: https://prod-api.ringg.ai/ca/api/v0. Send the workspace API key in the X-API-KEY header, from server-side code only.","Placing a call dials a real phone number and spends credits. Confirm the number with the user before calling.","To act on a Ringg workspace (place calls, edit agents, read transcripts), use the separate Ringg workspace MCP server at https://mcp.ringg.ai/mcp: https://docs.ringg.ai/resources/mcp-server/workspace-mcp-server/overview.md"]},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ringgai-0da73d20","hasAudioNarration":false,"actualSubdomain":"ringgai-0da73d20","customDomains":["docs.ringg.ai"],"gitSource":{"type":"github","owner":"stonkr","repo":"ringg-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6adb52e21a579503f2299e23","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"Documentation","count":90},{"language":"default","tag":"API reference","count":52},{"language":"default","tag":"Build agents","count":37},{"language":"default","tag":"Resources","count":34},{"language":"default","tag":"Learn","count":27},{"language":"default","tag":"Inventory","count":23},{"language":"default","tag":"Deploy","count":22},{"language":"default","tag":"Customize agent behaviour","count":19},{"language":"default","tag":"Agents","count":17},{"language":"default","tag":"Calling","count":15}],"searchSettings":{"showContentSnippets":true,"maxResults":8}},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"img.nav-logo{height:1.375rem!important;width:auto!important}.figure-card{display:flex;flex-direction:column;margin:0.5rem 0;overflow:hidden;border:1px solid rgb(10 10 11 / 0.08);border-radius:1rem;background:#ffffff;text-decoration:none!important;transition:border-color 150ms}.figure-card:hover{border-color:rgb(10 10 11 / 0.2)}.dark .figure-card{border-color:rgb(255 255 255 / 0.08);background:rgb(var(--background-dark))}.dark .figure-card:hover{border-color:rgb(255 255 255 / 0.2)}.figure-card-panel{display:flex;justify-content:center;height:12rem;margin:0.375rem 0.375rem 0;border-radius:0.75rem;-webkit-mask-image:linear-gradient(to bottom, #000 62%, transparent);mask-image:linear-gradient(to bottom, #000 62%, transparent);background:#f6f6f7 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='384' height='256' fill='none' stroke='%230a0a0b' stroke-opacity='0.03' stroke-width='1.5'%3E%3Ccircle cx='32' cy='32' r='25'/%3E%3Ccircle cx='96' cy='32' r='25'/%3E%3Crect x='135' y='7' width='50' height='50' rx='8'/%3E%3Ccircle cx='224' cy='32' r='25'/%3E%3Ccircle cx='288' cy='32' r='25'/%3E%3Ccircle cx='352' cy='32' r='25'/%3E%3Ccircle cx='32' cy='96' r='25'/%3E%3Ccircle cx='96' cy='96' r='25'/%3E%3Ccircle cx='160' cy='96' r='25'/%3E%3Ccircle cx='224' cy='96' r='25'/%3E%3Ccircle cx='288' cy='96' r='25'/%3E%3Ccircle cx='352' cy='96' r='25'/%3E%3Ccircle cx='32' cy='160' r='25'/%3E%3Crect x='71' y='135' width='50' height='50' rx='8'/%3E%3Ccircle cx='160' cy='160' r='25'/%3E%3Ccircle cx='224' cy='160' r='25'/%3E%3Crect x='263' y='135' width='50' height='50' rx='8'/%3E%3Crect x='327' y='135' width='50' height='50' rx='8'/%3E%3Crect x='7' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='96' cy='224' r='25'/%3E%3Crect x='135' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='224' cy='224' r='25'/%3E%3Crect x='263' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='352' cy='224' r='25'/%3E%3C/svg%3E\") center / 192px 128px}.dark .figure-card-panel{background:#0f0f11 url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='384' height='256' fill='none' stroke='%23ffffff' stroke-opacity='0.025' stroke-width='1.5'%3E%3Ccircle cx='32' cy='32' r='25'/%3E%3Ccircle cx='96' cy='32' r='25'/%3E%3Crect x='135' y='7' width='50' height='50' rx='8'/%3E%3Ccircle cx='224' cy='32' r='25'/%3E%3Ccircle cx='288' cy='32' r='25'/%3E%3Ccircle cx='352' cy='32' r='25'/%3E%3Ccircle cx='32' cy='96' r='25'/%3E%3Ccircle cx='96' cy='96' r='25'/%3E%3Ccircle cx='160' cy='96' r='25'/%3E%3Ccircle cx='224' cy='96' r='25'/%3E%3Ccircle cx='288' cy='96' r='25'/%3E%3Ccircle cx='352' cy='96' r='25'/%3E%3Ccircle cx='32' cy='160' r='25'/%3E%3Crect x='71' y='135' width='50' height='50' rx='8'/%3E%3Ccircle cx='160' cy='160' r='25'/%3E%3Ccircle cx='224' cy='160' r='25'/%3E%3Crect x='263' y='135' width='50' height='50' rx='8'/%3E%3Crect x='327' y='135' width='50' height='50' rx='8'/%3E%3Crect x='7' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='96' cy='224' r='25'/%3E%3Crect x='135' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='224' cy='224' r='25'/%3E%3Crect x='263' y='199' width='50' height='50' rx='8'/%3E%3Ccircle cx='352' cy='224' r='25'/%3E%3C/svg%3E\") center / 192px 128px}.figure-card-panel{--hairline-plate: #f6f6f7}.dark .figure-card-panel{--hairline-plate: #0f0f11}.figure-card-panel>[data-hairline]{width:13.75rem}.figure-card-text{flex:1;padding:0.25rem 1.25rem 1.25rem}.figure-card-title{font-weight:600;color:rgb(17 24 39)}.dark .figure-card-title{color:rgb(255 255 255)}.figure-card-body{margin-top:0.25rem;font-size:0.9375rem;line-height:1.6;color:rgb(75 85 99)}.dark .figure-card-body{color:rgb(161 161 170)}"}],"page":{"pagePath":"documentation/ringg-labs/parrot-stt/python-sdk","slug":"/documentation/ringg-labs/parrot-stt/python-sdk","pageMetadata":{"title":"Parrot STT Python SDK","sidebarTitle":"Python SDK","description":"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.","og:title":"Parrot STT Python SDK | Ringg AI","href":"/documentation/ringg-labs/parrot-stt/python-sdk"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Card,CodeBlock,Columns,Frame,Heading,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tooltip}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tooltip)_missingMdxReference(`Tooltip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`ringglabs`}),` Python SDK sends a complete audio file in one REST request, or streams live audio over a WebSocket and returns transcripts while the speaker talks; every feature works with both a synchronous `,_jsx(_components.code,{children:`Client`}),` and an `,_jsx(_components.code,{children:`AsyncClient`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Parrot `,_jsx(Tooltip,{tip:`Speech-to-text: turning the caller’s audio into text.`,children:`STT`}),` is in beta: SDK `,_jsx(_components.code,{children:`v0.1.x`}),`, MIT licence, Python 3.10 or later. Parameters and event fields can change before general availability.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Feature`}),_jsx(_components.th,{children:`Support`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Languages`}),_jsxs(_components.td,{children:[`Hindi (`,_jsx(_components.code,{children:`hi`}),`, the default) and English (`,_jsx(_components.code,{children:`en`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`File formats`}),_jsx(_components.td,{children:`WAV, MP3, FLAC, M4A`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`File size`}),_jsx(_components.td,{children:`Up to 10 MB per file`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Streaming audio`}),_jsxs(_components.td,{children:[`Raw mono PCM, 8,000 to 48,000 Hz, `,_jsx(_components.code,{children:`int16`}),`, `,_jsx(_components.code,{children:`linear16`}),`, `,_jsx(_components.code,{children:`int32`}),` or `,_jsx(_components.code,{children:`float32`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Billing`}),_jsxs(_components.td,{children:[`A streaming rate per hour of audio, in your workspace currency; see the `,_jsx(_components.strong,{children:`Pricing`}),` tab below`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(Columns,{cols:2,children:[_jsx(Card,{title:`A workspace API key`,icon:`key`,href:`/documentation/manage-account/api-key`,horizontal:true,children:_jsxs(_components.p,{children:[`The SDK sends it on every request; store it as `,_jsx(_components.code,{children:`RINGG_API_KEY`}),`.`]})}),_jsx(Card,{title:`Balance`,icon:`wallet`,href:`/documentation/manage-account/billing`,horizontal:true,children:_jsx(_components.p,{children:`At least one minute of credit to start a transcription.`})})]}),`\n`,_jsx(Heading,{level:`2`,id:`try-it-in-the-dashboard`,children:`Try it in the dashboard`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Sidebar → Labs → STT`}),` (page heading `,_jsx(_components.strong,{children:`Speech To Text`}),`, marked `,_jsx(_components.strong,{children:`BETA`}),`) transcribes without code and shows your usage. Its `,_jsx(_components.strong,{children:`API docs`}),` button opens the SDK on PyPI. The page has four tabs:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tab`}),_jsx(_components.th,{children:`What it holds`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Quick start`})}),_jsx(_components.td,{children:`The try-it panel and the install, key and first-call steps below`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Logs`})}),_jsx(_components.td,{children:`Every request, 50 per page`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Usage`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Total requests`}),`, `,_jsx(_components.strong,{children:`Audio processed`}),`, `,_jsx(_components.strong,{children:`Credits used`}),`, and `,_jsx(_components.strong,{children:`Daily credit usage`}),` for the past 14 days`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Pricing`})}),_jsxs(_components.td,{children:[`Your `,_jsx(_components.strong,{children:`Streaming rate`}),` per hour, the 30 included concurrent streams, and `,_jsx(_components.strong,{children:`Contact sales`}),` for more`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Logs`}),` lists `,_jsx(_components.strong,{children:`Request ID`}),`, `,_jsx(_components.strong,{children:`Timestamp`}),`, `,_jsx(_components.strong,{children:`Duration`}),`, `,_jsx(_components.strong,{children:`Mode`}),`, `,_jsx(_components.strong,{children:`Credits`}),` and `,_jsx(_components.strong,{children:`Status`}),`, filtered by `,_jsx(_components.strong,{children:`Status`}),` (`,_jsx(_components.strong,{children:`In progress`}),`, `,_jsx(_components.strong,{children:`Done`}),`, `,_jsx(_components.strong,{children:`Failed`}),`), `,_jsx(_components.strong,{children:`Mode`}),` (`,_jsx(_components.strong,{children:`Streaming`}),`, `,_jsx(_components.strong,{children:`On Final`}),`, `,_jsx(_components.strong,{children:`REST`}),`) and a date range. Click a row to open the `,_jsx(_components.strong,{children:`STT Request`}),` drawer with the request’s `,_jsx(_components.strong,{children:`Parameters`}),` and `,_jsx(_components.strong,{children:`Latency`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`In the try-it panel, pick `,_jsx(_components.strong,{children:`Language`}),` (`,_jsx(_components.strong,{children:`English`}),` or `,_jsx(_components.strong,{children:`Hindi`}),`; Hindi is the default), switch `,_jsx(_components.strong,{children:`Punctuation`}),` on if you want capitalisation and punctuation (off by default here; the SDK defaults it to on), then `,_jsx(_components.strong,{children:`Upload file`}),` (WAV, MP3, FLAC or M4A, up to 10 MB) or `,_jsx(_components.strong,{children:`Transcribe live`}),` from your microphone. The result shows on `,_jsx(_components.strong,{children:`Transcription`}),`; `,_jsx(_components.strong,{children:`Code`}),` shows the same request as TypeScript, Python and cURL.`]}),`\n`,_jsx(Frame,{caption:`The try-it panel after uploading a file`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=8b82c03ae39546ad40a3fff986e25165`,alt:`STT try-it panel with Language English, Punctuation on, Upload file and Transcribe live buttons, and a Transcription box showing a transcribed Acme Lending payment reminder with a 6.2s duration chip`,\"data-og-width\":`2336`,width:`2336`,\"data-og-height\":`564`,height:`564`,\"data-path\":`media/parrot-stt/try-it.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=280\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=ab17db6c3904373a57545f571bebd882 280w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=560\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=b5818a06213d29c4604e0c95f05e4f0a 560w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=840\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=8ef6a9985d7ab4981f38eb31012a32e0 840w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=e9592502380fd8d0049d3d474a20e2aa 1100w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=37f16c7f2ea0210b6c764bc2112b4f68 1650w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/try-it.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=459f047bf6d62ab1b230a47118e11c05 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`quickstart`,children:`Quickstart`}),`\n`,_jsx(_components.p,{children:`The video ends at the API key the SDK needs; the steps below start there.`}),`\n`,_jsx(Frame,{caption:`A tour of the STT page: file upload, then the Logs, Usage and Pricing tabs and the API key`,children:_jsx(`video`,{alt:`A tour of the STT page: file upload, then the Logs, Usage and Pricing tabs and the API key`,\"aria-label\":`A tour of the STT page: file upload, then the Logs, Usage and Pricing tabs and the API key`,controls:true,muted:true,playsInline:true,className:`mint-w-full mint-rounded-xl`,style:{aspectRatio:`16 / 10`},preload:`metadata`,controlsList:`nodownload noremoteplayback`,poster:`/media/parrot-stt/poster.webp`,children:_jsx(`source`,{src:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/video.webm?fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=17c501a6d8066c61158dfb29a49ad487`,type:`video/webm; codecs=\"av01.0.09M.08\"`,\"data-path\":`media/parrot-stt/video.webm`})})}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Install`,children:[_jsx(_components.p,{children:`Add the SDK to your environment:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ringglabs`})]}),`\n`]})})})]}),_jsxs(Step,{title:`Get an API key`,children:[_jsxs(_components.p,{children:[`The SDK uses your workspace `,_jsx(_components.a,{href:`/documentation/manage-account/api-key`,children:`API key`}),`, generated under `,_jsx(_components.strong,{children:`Settings → API key`}),`. Store it as `,_jsx(_components.code,{children:`RINGG_API_KEY`}),`.`]}),_jsx(_components.p,{children:`The workspace needs at least one minute of credit to start a transcription.`}),_jsx(Frame,{caption:`The key is shown once, when generated`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=d31220bb281b10651699361c39a401e3`,alt:`Generate API Key dialog showing a demo key, a Copy button and a warning that the key cannot be viewed again after leaving the page`,\"data-og-width\":`1120`,width:`1120`,\"data-og-height\":`664`,height:`664`,\"data-path\":`media/parrot-stt/api-key.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=280\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=1d0f24a9ccc0cd710785d98e50f46d4c 280w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=560\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=3fcb5afadaf3740b0a087abfc3c75478 560w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=840\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=be439bda6303e83a5631a9792f9170e2 840w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=51d374631145af55f95eb16655c5ccdb 1100w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=baa8c95b727434724cfc496cf5e79923 1650w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/api-key.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=68782e24db8eea3cf49b51986df5b502 2500w`})})]}),_jsxs(Step,{title:`First call`,children:[_jsx(_components.p,{children:`Transcribe a local audio file:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.transcribe(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.transcription)`})]}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`sdk-implementation`,children:`SDK implementation`}),`\n`,_jsxs(_components.p,{children:[`Pick the example that matches your audio source and execution model. The streaming examples read a WAV file and send it in 20 ms chunks, using two helpers from `,_jsx(_components.a,{href:`#audio-helpers`,children:`Audio helpers`}),`; for live audio, send each chunk as it is captured instead (20 to 40 ms chunks work best).`]}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`Sync stream`,id:`sync-stream`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`TimeoutError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` audio_helpers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k, iter_pcm_chunks`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sample_rate, audio `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`transcripts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` []`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client, client.stream(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` sample_rate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sample_rate, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`encoding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"int16\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`enable_cap_punc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` iter_pcm_chunks(audio, sample_rate, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.send_audio(chunk)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.end()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transcript\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` and`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.transcription.strip():`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` transcripts.append(event.transcription.strip())`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` pass`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(transcripts)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Async stream`,id:`async-stream`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`24`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`24`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncClient, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`TimeoutError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` audio_helpers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k, iter_pcm_chunks`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sample_rate, audio `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncClient(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client, client.stream(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` sample_rate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sample_rate, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`encoding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"int16\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`enable_cap_punc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` iter_pcm_chunks(audio, sample_rate, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.send_audio(chunk)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.end()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transcript\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(event.transcription)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` pass`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})})}),_jsx(Tab,{title:`On-final`,id:`on-final`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`TimeoutError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` audio_helpers `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k, iter_pcm_chunks`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sample_rate, audio `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_wav_mono_int16_16k(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`partials, finals `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [], []`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client, client.stream(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` sample_rate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`sample_rate, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`encoding`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"int16\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"on_final\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`accept_client_vad_events`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.start_speaking()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` iter_pcm_chunks(audio, sample_rate, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.send_audio(chunk)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.stop_speaking()`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.end()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.events():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.type `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"transcript\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` continue`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` text `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.transcription.strip()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (finals `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.is_final `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` partials).append(text)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SdkTimeoutError:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` pass`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(finals)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Offline`,id:`offline`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.transcribe(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` language`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"en\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` enable_cap_punc`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(result.request_id, result.transcription)`})]}),`\n`]})})})}),_jsx(Tab,{title:`Bytes / IO`,id:`bytes-%2F-io`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` io `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BytesIO`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pathlib `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`wav_bytes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).read_bytes()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # bytes source`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r1 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.transcribe(wav_bytes, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`filename`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # file-like source`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r2 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.transcribe(BytesIO(wav_bytes), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`filename`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sample.wav\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`audio-helpers`,children:`Audio helpers`}),`\n`,_jsxs(_components.p,{children:[`The streaming examples import these from `,_jsx(_components.code,{children:`audio_helpers.py`}),`. They use only the Python standard library.`]}),`\n`,_jsxs(Accordion,{title:`audio_helpers.py`,icon:`file-code`,id:`audio-helpers-py`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wave`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` load_wav_mono_int16_16k`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`path`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Read a 16 kHz, mono, 16-bit PCM WAV file. Returns (sample_rate, pcm_bytes).\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wave.open(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(path), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wav:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (wav.getframerate(), wav.getnchannels(), wav.getsampwidth()) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`16000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` raise`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Expected a 16 kHz, mono, 16-bit PCM WAV file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` wav.getframerate(), wav.readframes(wav.getnframes())`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` iter_pcm_chunks`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`pcm`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sample_rate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chunk_ms`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"\"Yield raw int16 PCM in chunks of chunk_ms milliseconds.\"\"\"`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk_bytes `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sample_rate `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk_ms `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`//`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # 2 bytes per int16 sample`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` start `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` range`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`len`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(pcm), chunk_bytes):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` yield`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pcm[start:start `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk_bytes]`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`To convert another file to this format, run `,_jsx(_components.code,{children:`ffmpeg -i input.mp3 -ac 1 -ar 16000 -sample_fmt s16 sample.wav`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`client-initialization`,children:`Client initialization`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Client(...)`}),` and `,_jsx(_components.code,{children:`AsyncClient(...)`}),` share the same constructor. Both can be used as context managers (`,_jsx(_components.code,{children:`with`}),` / `,_jsx(_components.code,{children:`async with`}),`), which close the underlying connections on exit.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`base_url`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"prod-api.ringg.ai\"`})}),_jsx(_components.td,{children:`Host name.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Default API key for all requests; can be overridden per call.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`timeout`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`TimeoutConfig()`})}),_jsxs(_components.td,{children:[`HTTP and WebSocket timeout budgets. See `,_jsx(_components.a,{href:`#timeouts`,children:`Timeouts`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`default_headers`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Extra headers attached to SDK requests.`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`transcribe-offline-/-rest`,children:`transcribe() (offline / REST)`}),`\n`,_jsxs(_components.p,{children:[`Single-shot transcription of a complete audio file. Available on both `,_jsx(_components.code,{children:`Client`}),` and `,_jsx(_components.code,{children:`AsyncClient`}),` (`,_jsx(_components.code,{children:`await client.transcribe(...)`}),`).`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`source`})}),_jsx(_components.td,{}),_jsxs(_components.td,{children:[`Input audio: `,_jsx(_components.code,{children:`str`}),`, `,_jsx(_components.code,{children:`Path`}),`, `,_jsx(_components.code,{children:`bytes`}),`, `,_jsx(_components.code,{children:`bytearray`}),`, or `,_jsx(_components.code,{children:`BinaryIO`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`language`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"hi\"`})}),_jsxs(_components.td,{children:[`Language of the audio: `,_jsx(_components.code,{children:`\"hi\"`}),` or `,_jsx(_components.code,{children:`\"en\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enable_cap_punc`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`True`})}),_jsx(_components.td,{children:`Enable capitalization and punctuation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Per-request API key override.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`filename`})}),_jsx(_components.td,{children:`auto-detected`}),_jsxs(_components.td,{children:[`Multipart filename, used to detect the audio format. Falls back to `,_jsx(_components.code,{children:`\"audio.wav\"`}),`. Set it when passing `,_jsx(_components.code,{children:`bytes`}),` or a stream that isn’t WAV.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`content_type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"audio/wav\"`})}),_jsx(_components.td,{children:`Multipart content type.`})]})]})]}),`\n`,_jsxs(Heading,{level:`3`,id:`response-resttranscriptionresult`,children:[`Response: `,_jsx(_components.code,{children:`RestTranscriptionResult`})]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`status`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"success\"`}),` when the file was transcribed.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transcription`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})}),_jsx(_components.td,{children:`Full transcript of the file.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`is_final`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`bool`})}),_jsxs(_components.td,{children:[`Always `,_jsx(_components.code,{children:`True`}),` for file transcription.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`language`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})}),_jsx(_components.td,{children:`Language used for transcription.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`duration_seconds`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`float`})}),_jsx(_components.td,{children:`Length of the transcribed audio, in seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`processing_time_seconds`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`float`})}),_jsx(_components.td,{children:`Server processing time, in seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`request_id`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`str`})}),_jsx(_components.td,{children:`Unique ID for the request. Include it when contacting support.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`raw`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dict`})}),_jsx(_components.td,{children:`The unparsed JSON response.`})]})]})]}),`\n`,_jsx(Frame,{caption:`A request opened from the Logs tab by its request_id`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=e8aaa3d6067ab7ddf68c9020d8dfbcb6`,alt:`STT Request drawer for a Done streaming request: timestamp, duration 47.8s, mode Streaming, credits 0.40 rupees, and a Latency tab listing audio duration, compute latency, processing time and segments`,\"data-og-width\":`1024`,width:`1024`,\"data-og-height\":`1010`,height:`1010`,\"data-path\":`media/parrot-stt/log-detail.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=280\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=e40252ede0e289e01494c88b1b8ea77c 280w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=560\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=e079eea5a37a79f85a5d7b729d169539 560w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=840\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=9f23d720b213ac03e8da0ab63acdc39f 840w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=f1ff8d4ae59e5061053e7d311976ca26 1100w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=fc0c481232da90bb2f5269af5f82d14e 1650w, https://mintcdn.com/ringgai-0da73d20/XUOcNie5hfK3q--Y/media/parrot-stt/log-detail.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=XUOcNie5hfK3q--Y\u0026q=85\u0026s=0e4b273727b1a055c5f432b8888f8a71 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`stream-real-time-/-websocket`,children:`stream() (real-time / WebSocket)`}),`\n`,_jsx(_components.p,{children:`Open a streaming session, send audio chunks, and receive transcript events. Use it as a context manager so the session is opened on entry and closed on exit.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`sample_rate`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`16000`})}),_jsx(_components.td,{children:`Audio sample rate in Hz, from 8000 to 48000.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`encoding`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"int16\"`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`int16`}),`, `,_jsx(_components.code,{children:`linear16`}),`, `,_jsx(_components.code,{children:`float32`}),`, or `,_jsx(_components.code,{children:`int32`}),`. Audio must be raw mono PCM with no file header.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`language`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"hi\"`})}),_jsxs(_components.td,{children:[`Language hint: `,_jsx(_components.code,{children:`\"hi\"`}),` or `,_jsx(_components.code,{children:`\"en\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`mode`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`\"stream\"`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"stream\"`}),` or `,_jsx(_components.code,{children:`\"on_final\"`}),`. See below.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vad_tail_sil_ms`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`200`})}),_jsxs(_components.td,{children:[`Server `,_jsx(Tooltip,{tip:`Voice activity detection: how the agent decides the caller has started or stopped speaking.`,children:`VAD`}),` tail silence in ms: how long a pause ends a segment.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`vad_confidence`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`0.55`})}),_jsx(_components.td,{children:`Server VAD confidence threshold.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enable_cap_punc`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`True`})}),_jsx(_components.td,{children:`Capitalization / punctuation.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`accept_client_vad_events`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`False`})}),_jsxs(_components.td,{children:[`Enables `,_jsx(_components.code,{children:`start_speaking()`}),` / `,_jsx(_components.code,{children:`stop_speaking()`}),`. Only applies in `,_jsx(_components.code,{children:`on_final`}),` mode.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`api_key`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`None`})}),_jsx(_components.td,{children:`Per-stream API key override.`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`stream-and-on-final-modes`,children:`Stream and on-final modes`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`stream`})}),`: the server detects pauses with its own voice activity detection (VAD) and sends a final `,_jsx(_components.code,{children:`transcript`}),` event for each spoken segment. Join the segments to build the full transcript. The session’s closing `,_jsx(_components.code,{children:`transcript`}),` event can have an empty `,_jsx(_components.code,{children:`transcription`}),`, so skip blank ones.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`on_final`})}),`: you mark each turn with `,_jsx(_components.code,{children:`start_speaking()`}),` and `,_jsx(_components.code,{children:`stop_speaking()`}),` (requires `,_jsx(_components.code,{children:`accept_client_vad_events=True`}),`). The server sends partial transcripts (`,_jsx(_components.code,{children:`is_final=False`}),`) that grow as the turn continues, then one final transcript (`,_jsx(_components.code,{children:`is_final=True`}),`) after `,_jsx(_components.code,{children:`stop_speaking()`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`session-methods`,children:`Session methods`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Method`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`send_audio(bytes)`})}),_jsx(_components.td,{children:`Send a raw audio chunk.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`send_vad_event(state)`})}),_jsxs(_components.td,{children:[`Send an explicit VAD event: `,_jsx(_components.code,{children:`\"user_start_speaking\"`}),` or `,_jsx(_components.code,{children:`\"user_stop_speaking\"`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`start_speaking()`}),` / `,_jsx(_components.code,{children:`stop_speaking()`})]}),_jsx(_components.td,{children:`Convenience wrappers for VAD events.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ping()`})}),_jsx(_components.td,{children:`Send a ping frame. The SDK also pings automatically every 30 seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`end(command=\"end\")`})}),_jsx(_components.td,{children:`Finalize / terminate the stream.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`recv_event()`}),` / `,_jsx(_components.code,{children:`events()`})]}),_jsxs(_components.td,{children:[`Receive parsed server events. `,_jsx(_components.code,{children:`events()`}),` stops when the server closes the session.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`close()`})}),_jsx(_components.td,{children:`Close the WebSocket session.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`The async session is identical, with `,_jsx(_components.code,{children:`await`}),` on every call and `,_jsx(_components.code,{children:`async for`}),` on `,_jsx(_components.code,{children:`events()`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`websocket-event-types`,children:`WebSocket event types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`When it is sent`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ready`})}),_jsxs(_components.td,{children:[`Once, when the session opens. Confirms the effective settings and the session’s `,_jsx(_components.code,{children:`request_id`}),`. The SDK reads it during the handshake and exposes it as `,_jsx(_components.code,{children:`session.ready_event`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transcript`})}),_jsx(_components.td,{children:`A transcription result. See the fields below.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ack`})}),_jsxs(_components.td,{children:[`Acknowledges a VAD event or `,_jsx(_components.code,{children:`end`}),`. `,_jsx(_components.code,{children:`ack_for`}),` names the message and `,_jsx(_components.code,{children:`state`}),` gives the result.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pong`})}),_jsxs(_components.td,{children:[`Reply to `,_jsx(_components.code,{children:`ping()`}),`, with a server `,_jsx(_components.code,{children:`timestamp`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`error`})}),_jsxs(_components.td,{children:[`The server rejected a message or ended the session. Read `,_jsx(_components.code,{children:`code`}),` and `,_jsx(_components.code,{children:`detail`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`transcript-event-fields`,children:`Transcript event fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transcription`})}),_jsx(_components.td,{children:`Transcribed text for this segment or turn.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`is_final`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`True`}),` when the text will not change.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`language`})}),_jsx(_components.td,{children:`Language used for transcription.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`request_id`})}),_jsx(_components.td,{children:`Session ID. Include it when contacting support.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`segment_idx`})}),_jsx(_components.td,{children:`Position of this segment within the session.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`segments`})}),_jsx(_components.td,{children:`Number of segments, on the closing event.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`compute_latency_ms`})}),_jsx(_components.td,{children:`Model compute time for this segment, in ms.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`audio_duration_sec`})}),_jsx(_components.td,{children:`Audio received in the session, in seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`transcribed_audio_duration_sec`})}),_jsx(_components.td,{children:`Audio that was transcribed, in seconds.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`processing_time_ms`})}),_jsx(_components.td,{children:`Total processing time, in ms.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`raw`})}),_jsx(_components.td,{children:`The unparsed JSON event.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Fields that don’t apply to an event are `,_jsx(_components.code,{children:`None`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`timeouts`,children:`Timeouts`}),`\n`,_jsxs(_components.p,{children:[`Pass a `,_jsx(_components.code,{children:`TimeoutConfig`}),` to `,_jsx(_components.code,{children:`Client(timeout=...)`}),`. All values are in seconds.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Default`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`connect`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`HTTP connect.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`read`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`HTTP read.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`write`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`HTTP write.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pool`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`HTTP pool.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ws_open`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`WebSocket open.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ws_recv`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`30.0`})}),_jsxs(_components.td,{children:[`WebSocket receive. `,_jsx(_components.code,{children:`events()`}),` raises `,_jsx(_components.code,{children:`TimeoutError`}),` if no event arrives in this time.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ws_close`})}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`10.0`})}),_jsx(_components.td,{children:`WebSocket close.`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ringglabs.stt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client, TimeoutConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Client(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"RINGG_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`TimeoutConfig(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`read`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`ws_recv`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`60.0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`All SDK exceptions are importable from `,_jsx(_components.code,{children:`ringglabs.stt`}),` and inherit from `,_jsx(_components.code,{children:`RinggLabsError`}),`.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Exception`}),_jsx(_components.th,{children:`Raised when`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ValidationError`})}),_jsx(_components.td,{children:`An argument is invalid, for example a file path that doesn’t exist.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ApiError`})}),_jsxs(_components.td,{children:[`The server returns an error. Has `,_jsx(_components.code,{children:`message`}),`, `,_jsx(_components.code,{children:`status_code`}),`, `,_jsx(_components.code,{children:`code`}),`, and `,_jsx(_components.code,{children:`payload`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`AuthenticationError`})}),_jsxs(_components.td,{children:[`The API key is missing or invalid (`,_jsx(_components.code,{children:`401`}),`), or the workspace doesn’t have enough credit (`,_jsx(_components.code,{children:`402`}),`). Subclass of `,_jsx(_components.code,{children:`ApiError`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TransportError`})}),_jsx(_components.td,{children:`A network failure.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`TimeoutError`})}),_jsxs(_components.td,{children:[`A request or receive exceeded its `,_jsx(_components.a,{href:`#timeouts`,children:`timeout`}),`. Subclass of `,_jsx(_components.code,{children:`TransportError`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ProtocolError`})}),_jsx(_components.td,{children:`The server sent a malformed or unexpected message.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`A file over 10 MB is rejected with an `,_jsx(_components.code,{children:`ApiError`}),` (`,_jsx(_components.code,{children:`status_code=413`}),`), and a file in another format with `,_jsx(_components.code,{children:`status_code=415`}),` (`,_jsx(_components.code,{children:`code`}),` `,_jsx(_components.code,{children:`UNSUPPORTED_AUDIO_FORMAT`}),`). A streaming session ends after one hour with the error code `,_jsx(_components.code,{children:`MAX_DURATION_EXCEEDED`}),`, and after 5 minutes without a message from the client with `,_jsx(_components.code,{children:`SESSION_TIMEOUT`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`recommended-practices`,children:`Recommended practices`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Reuse client instances in long-running services.`}),`\n`,_jsxs(_components.li,{children:[`Set explicit timeout budgets with `,_jsx(_components.code,{children:`TimeoutConfig`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Log `,_jsx(_components.code,{children:`result.raw`}),` and `,_jsx(_components.code,{children:`event.raw`}),`, which carry the `,_jsx(_components.code,{children:`request_id`}),`.`]}),`\n`,_jsx(_components.li,{children:`Retry only transport failures and idempotent requests.`}),`\n`,_jsx(_components.li,{children:`Keep sync and async execution models separate.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(Columns,{cols:2,children:[_jsx(Card,{title:`Store the key safely`,icon:`key-round`,href:`/documentation/manage-account/api-key#store-it-safely`,children:_jsx(_components.p,{children:`Keep it in a secret manager and rotate it if it leaks.`})}),_jsx(Card,{title:`Use Parrot through TrueFoundry`,icon:`plug`,href:`/documentation/ringg-labs/parrot-stt/truefoundry`,children:_jsx(_components.p,{children:`Gateway access control and tracing in front of Parrot.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Parrot STT Python SDK","sidebarTitle":"Python SDK","description":"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.","og:title":"Parrot STT Python SDK | Ringg AI","href":"/documentation/ringg-labs/parrot-stt/python-sdk"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Before you start","slug":"before-you-start","depth":2,"children":[]},{"title":"Try it in the dashboard","slug":"try-it-in-the-dashboard","depth":2,"children":[]},{"title":"Quickstart","slug":"quickstart","depth":2,"children":[]},{"title":"SDK implementation","slug":"sdk-implementation","depth":2,"children":[{"title":"Audio helpers","slug":"audio-helpers","depth":3,"children":[]}]},{"title":"Client initialization","slug":"client-initialization","depth":2,"children":[]},{"title":"transcribe() (offline / REST)","slug":"transcribe-offline-/-rest","depth":2,"children":[{"title":"Response: RestTranscriptionResult","slug":"response-resttranscriptionresult","depth":3,"children":[]}]},{"title":"stream() (real-time / WebSocket)","slug":"stream-real-time-/-websocket","depth":2,"children":[{"title":"Stream and on-final modes","slug":"stream-and-on-final-modes","depth":3,"children":[]},{"title":"Session methods","slug":"session-methods","depth":3,"children":[]},{"title":"WebSocket event types","slug":"websocket-event-types","depth":3,"children":[]},{"title":"Transcript event fields","slug":"transcript-event-fields","depth":3,"children":[]}]},{"title":"Timeouts","slug":"timeouts","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Recommended practices","slug":"recommended-practices","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/ringgai-0da73d20/45c33e65ef05fabf/hairline.js"],"dynamicCss":".mint-w-full {\n width: 100%\n}\n.mint-rounded-xl {\n border-radius: 0.75rem\n}","subdomain":"ringgai-0da73d20","siteName":"Ringg AI","title":"Parrot STT Python SDK | Ringg AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-12T09:07:15.405Z","originalFileLocation":"documentation/ringg-labs/parrot-stt/python-sdk.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ringg AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Parrot STT Python SDK | Ringg AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ringg AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ringgai-0da73d20.mintlify.site/_mintlify/api/og/v2?division=Parrot+STT\u0026amp;title=Parrot+STT+Python+SDK\u0026amp;description=Transcribe+audio+files+or+stream+live+audio+in+Hindi+and+English+with+the+Parrot+STT+Python+SDK%2C+with+every+parameter%2C+event+and+error%2C+and+the+STT+dashboard.\u0026amp;theme=737b8671029ef070100737b1\u0026amp;signature=c98bf0911c422b1615368b6814a7c4207afd57357b657f3983c06f578003951e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Parrot STT Python SDK | Ringg AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ringgai-0da73d20.mintlify.site/_mintlify/api/og/v2?division=Parrot+STT\u0026amp;title=Parrot+STT+Python+SDK\u0026amp;description=Transcribe+audio+files+or+stream+live+audio+in+Hindi+and+English+with+the+Parrot+STT+Python+SDK%2C+with+every+parameter%2C+event+and+error%2C+and+the+STT+dashboard.\u0026amp;theme=737b8671029ef070100737b1\u0026amp;signature=c98bf0911c422b1615368b6814a7c4207afd57357b657f3983c06f578003951e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/ringgai-0da73d20/p7P0VdTXwvUPgoLE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ringg AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A0A0B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/documentation/ringg-labs/parrot-stt/python-sdk.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.ringg.ai/#organization\",\"name\":\"Ringg AI\",\"legalName\":\"Stoic AI Private Limited\",\"url\":\"https://www.ringg.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://assets.ringg.ai/images/logo/logo.svg\"},\"sameAs\":[\"https://x.com/ringg_ai\",\"https://www.linkedin.com/company/ringg\",\"https://www.youtube.com/@RinggAI\",\"https://www.instagram.com/ringg_ai\",\"https://discord.gg/YuEnb8Vsca\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ringg.ai#website\",\"name\":\"Ringg AI\",\"url\":\"https://docs.ringg.ai\",\"publisher\":{\"@id\":\"https://www.ringg.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk#webpage\",\"url\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk\",\"name\":\"Parrot STT Python SDK\",\"description\":\"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\",\"dateModified\":\"2026-10-12T09:07:15.405Z\",\"isPartOf\":{\"@id\":\"https://docs.ringg.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Ringg AI\",\"item\":\"https://docs.ringg.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Parrot STT Python SDK\",\"item\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk#article\",\"headline\":\"Parrot STT Python SDK\",\"name\":\"Parrot STT Python SDK\",\"description\":\"Transcribe audio files or stream live audio in Hindi and English with the Parrot STT Python SDK, with every parameter, event and error, and the STT dashboard.\",\"url\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ringg.ai/documentation/ringg-labs/parrot-stt/python-sdk#webpage\"},\"dateModified\":\"2026-10-12T09:07:15.405Z\",\"publisher\":{\"@id\":\"https://www.ringg.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ringg.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ringg AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Ringg AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/documentation/ringg-labs/parrot-stt/python-sdk.md","siteName":"Ringg AI","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/get-started/introduction"}]},{"tab":"Documentation","pages":[{"title":"Ringg AI documentation","sidebarTitle":"Introduction","icon":"book-open","href":"/documentation/introduction"},{"group":"Build agents","icon":"bot","pages":[{"group":"Agents","pages":[{"title":"Agent types","sidebarTitle":"Agent types","href":"/documentation/build-agents/agents/agent-types"},{"title":"Create an agent","sidebarTitle":"Create an agent","href":"/documentation/build-agents/agents/create-an-agent"},{"group":"Multi-prompt agents","pages":[{"title":"Multi-prompt agents","sidebarTitle":"Overview","href":"/documentation/build-agents/agents/multi-prompt-agents/overview"},{"title":"Node types and connections","sidebarTitle":"Node types and connections","href":"/documentation/build-agents/agents/multi-prompt-agents/node-types-and-connections"},{"title":"Multi-prompt global settings","sidebarTitle":"Global settings","href":"/documentation/build-agents/agents/multi-prompt-agents/global-settings"},{"title":"Test and convert multi-prompt agents","sidebarTitle":"Test and convert","href":"/documentation/build-agents/agents/multi-prompt-agents/test-and-convert"}]},{"group":"WhatsApp agents","tag":"NEW","pages":[{"title":"WhatsApp agents","sidebarTitle":"Overview","href":"/documentation/build-agents/agents/whatsapp-agents/overview"},{"title":"Create a WhatsApp agent","sidebarTitle":"Create an agent","href":"/documentation/build-agents/agents/whatsapp-agents/create-an-agent"},{"title":"WhatsApp Flows","sidebarTitle":"Flows","href":"/documentation/build-agents/agents/whatsapp-agents/flows"},{"title":"Build WhatsApp Flows in Ringg","sidebarTitle":"Flow builder","href":"/documentation/build-agents/agents/whatsapp-agents/flow-builder"},{"title":"WhatsApp Flows with live data","sidebarTitle":"Flows with live data","href":"/documentation/build-agents/agents/whatsapp-agents/flows-live-data"},{"title":"Live data from your server","sidebarTitle":"Live data from your server","href":"/documentation/build-agents/agents/whatsapp-agents/flows-your-server"}]}]},{"group":"Customize agent behaviour","pages":[{"title":"Agent prompt","sidebarTitle":"Agent prompt","href":"/documentation/build-agents/customize-agent-behaviour/agent-prompt"},{"title":"Voice and language","sidebarTitle":"Voice and language","href":"/documentation/build-agents/customize-agent-behaviour/voice-and-language"},{"title":"Custom variables","sidebarTitle":"Custom variables","href":"/documentation/build-agents/customize-agent-behaviour/custom-variables"},{"title":"Attach a knowledge base","sidebarTitle":"Attach a knowledge base","href":"/documentation/build-agents/customize-agent-behaviour/attach-a-knowledge-base"},{"group":"Tools","pages":[{"title":"Tools","sidebarTitle":"Overview","href":"/documentation/build-agents/customize-agent-behaviour/tools/overview"},{"title":"API tools","sidebarTitle":"API tools","href":"/documentation/build-agents/customize-agent-behaviour/tools/api-tools"},{"title":"Integration tools","sidebarTitle":"Integration tools","href":"/documentation/build-agents/customize-agent-behaviour/tools/integration-tools"},{"title":"System tools","sidebarTitle":"System tools","href":"/documentation/build-agents/customize-agent-behaviour/tools/system-tools"},{"title":"Function tools and conditions","sidebarTitle":"Function tools and conditions","href":"/documentation/build-agents/customize-agent-behaviour/tools/function-tools-and-conditions"},{"title":"Post-call tools","sidebarTitle":"Post-call tools","href":"/documentation/build-agents/customize-agent-behaviour/tools/post-call-tools"},{"title":"Workspace tools","sidebarTitle":"Workspace tools","href":"/documentation/build-agents/customize-agent-behaviour/tools/workspace-tools"},{"title":"WhatsApp tools","sidebarTitle":"WhatsApp tools","tag":"NEW","href":"/documentation/build-agents/customize-agent-behaviour/tools/whatsapp-tools"}]},{"title":"Call settings","sidebarTitle":"Call settings","href":"/documentation/build-agents/customize-agent-behaviour/call-settings"},{"title":"Advanced Analysis","sidebarTitle":"Advanced Analysis","href":"/documentation/build-agents/customize-agent-behaviour/advanced-analysis"},{"title":"Event Subscription","sidebarTitle":"Event Subscription","href":"/documentation/build-agents/customize-agent-behaviour/event-subscription"},{"group":"Webhooks","pages":[{"title":"Webhook setup and errors","sidebarTitle":"Setup and errors","href":"/documentation/build-agents/customize-agent-behaviour/webhooks/setup-and-errors"},{"title":"Call events","sidebarTitle":"Call events","href":"/documentation/build-agents/customize-agent-behaviour/webhooks/call-events"},{"title":"WhatsApp chat events","sidebarTitle":"WhatsApp chat events","tag":"NEW","href":"/documentation/build-agents/customize-agent-behaviour/webhooks/whatsapp-chat-events"},{"title":"Webhook field reference","sidebarTitle":"Field reference","href":"/documentation/build-agents/customize-agent-behaviour/webhooks/field-reference"}]}]},{"group":"Test and improve","pages":[{"title":"Test an agent","sidebarTitle":"Test an agent","href":"/documentation/build-agents/test-and-improve/test-an-agent"},{"title":"Drafts and versions","sidebarTitle":"Drafts and versions","href":"/documentation/build-agents/test-and-improve/drafts-and-versions"}]},{"group":"Workflows","pages":[{"title":"Workflows","sidebarTitle":"Overview","href":"/documentation/build-agents/workflows/overview"},{"title":"Build a workflow","sidebarTitle":"Build a workflow","href":"/documentation/build-agents/workflows/build-a-workflow"},{"title":"Test and publish a workflow","sidebarTitle":"Test and publish","href":"/documentation/build-agents/workflows/test-and-publish"},{"title":"Workflow block reference","sidebarTitle":"Block reference","href":"/documentation/build-agents/workflows/block-reference"}]}]},{"group":"Inventory","icon":"package","pages":[{"title":"Knowledge base","sidebarTitle":"Knowledge base","href":"/documentation/inventory/knowledge-base"},{"group":"Tools (integrations)","pages":[{"title":"Connect an app","sidebarTitle":"Connect an app","href":"/documentation/inventory/tools-integrations/connect-an-app"},{"title":"Connect WhatsApp","sidebarTitle":"Connect WhatsApp","tag":"NEW","href":"/documentation/inventory/tools-integrations/connect-whatsapp"}]},{"group":"Phone numbers","pages":[{"title":"Phone numbers","sidebarTitle":"Overview","href":"/documentation/inventory/phone-numbers/overview"},{"title":"Buy or import a number","sidebarTitle":"Buy or import a number","href":"/documentation/inventory/phone-numbers/buy-or-import-a-number"},{"group":"Your own telephony","pages":[{"title":"Bring your own telephony","sidebarTitle":"BYOT overview","href":"/documentation/inventory/phone-numbers/your-own-telephony/byot-overview"},{"title":"SIP trunking","sidebarTitle":"SIP trunking","href":"/documentation/inventory/phone-numbers/your-own-telephony/sip-trunking"},{"title":"Plivo","sidebarTitle":"Plivo","href":"/documentation/inventory/phone-numbers/your-own-telephony/plivo"},{"title":"Exotel","sidebarTitle":"Exotel","href":"/documentation/inventory/phone-numbers/your-own-telephony/exotel"},{"title":"Twilio","sidebarTitle":"Twilio","href":"/documentation/inventory/phone-numbers/your-own-telephony/twilio"},{"title":"Telnyx","sidebarTitle":"Telnyx","href":"/documentation/inventory/phone-numbers/your-own-telephony/telnyx"},{"title":"InTalk","sidebarTitle":"InTalk","href":"/documentation/inventory/phone-numbers/your-own-telephony/intalk"},{"title":"Ameyo","sidebarTitle":"Ameyo","href":"/documentation/inventory/phone-numbers/your-own-telephony/ameyo"},{"title":"Ozonetel","sidebarTitle":"Ozonetel","href":"/documentation/inventory/phone-numbers/your-own-telephony/ozonetel"},{"title":"New provider requirements","sidebarTitle":"New provider requirements","href":"/documentation/inventory/phone-numbers/your-own-telephony/new-provider-requirements"}]},{"title":"Number pools","sidebarTitle":"Number pools","href":"/documentation/inventory/phone-numbers/number-pools"},{"title":"Inbound agent number","sidebarTitle":"Inbound agent number","href":"/documentation/inventory/phone-numbers/inbound-agent-number"}]}]},{"group":"Deploy","icon":"rocket","pages":[{"group":"Campaigns","pages":[{"title":"Campaigns","sidebarTitle":"Overview","href":"/documentation/deploy/campaigns/overview"},{"title":"Create a campaign","sidebarTitle":"Create a campaign","href":"/documentation/deploy/campaigns/create-a-campaign"},{"title":"Workflow campaign","sidebarTitle":"Workflow campaign","href":"/documentation/deploy/campaigns/workflow-campaign"},{"title":"Campaigns by API","sidebarTitle":"Campaigns by API","href":"/documentation/deploy/campaigns/campaigns-by-api"},{"title":"Calling list","sidebarTitle":"Calling list","href":"/documentation/deploy/campaigns/calling-list"},{"title":"Manage a campaign","sidebarTitle":"Manage a campaign","href":"/documentation/deploy/campaigns/manage-a-campaign"}]},{"group":"Web and apps","pages":[{"group":"Web widget","pages":[{"title":"Web widget","sidebarTitle":"Overview","href":"/documentation/deploy/web-and-apps/web-widget/overview"},{"title":"Web widget configuration","sidebarTitle":"Configuration","href":"/documentation/deploy/web-and-apps/web-widget/configuration"},{"title":"Web widget events","sidebarTitle":"Events","href":"/documentation/deploy/web-and-apps/web-widget/events"},{"title":"Chat mode","sidebarTitle":"Chat mode","href":"/documentation/deploy/web-and-apps/web-widget/chat-mode"},{"title":"Chat components","sidebarTitle":"Components","href":"/documentation/deploy/web-and-apps/web-widget/components"},{"title":"Chat component data","sidebarTitle":"Data","href":"/documentation/deploy/web-and-apps/web-widget/data"},{"title":"Chat component recipes","sidebarTitle":"Recipes","href":"/documentation/deploy/web-and-apps/web-widget/recipes"},{"title":"Web widget styling","sidebarTitle":"Styling","href":"/documentation/deploy/web-and-apps/web-widget/styling"},{"title":"Web widget launch checklist","sidebarTitle":"Launch checklist","href":"/documentation/deploy/web-and-apps/web-widget/launch-checklist"}]},{"group":"Mobile apps","pages":[{"title":"Mobile app install","sidebarTitle":"Install","href":"/documentation/deploy/web-and-apps/mobile-apps/install"},{"title":"Mobile widget configuration","sidebarTitle":"Configuration","href":"/documentation/deploy/web-and-apps/mobile-apps/configuration"},{"title":"Mobile widget events","sidebarTitle":"Events","href":"/documentation/deploy/web-and-apps/mobile-apps/events"}]}]},{"group":"WhatsApp","tag":"NEW","pages":[{"title":"Start a conversation","sidebarTitle":"Start a conversation","href":"/documentation/deploy/whatsapp/start-a-conversation"},{"title":"WhatsApp Relay","sidebarTitle":"Relay overview","href":"/documentation/deploy/whatsapp/relay-overview"},{"title":"WhatsApp Relay integration guide","sidebarTitle":"Relay integration guide","href":"/documentation/deploy/whatsapp/relay-integration-guide"},{"title":"WhatsApp Relay troubleshooting","sidebarTitle":"Relay troubleshooting","href":"/documentation/deploy/whatsapp/relay-troubleshooting"}]}]},{"group":"Monitor","icon":"chart-line","pages":[{"title":"Logs","sidebarTitle":"Logs","href":"/documentation/monitor/logs"},{"title":"Analytics","sidebarTitle":"Analytics","href":"/documentation/monitor/analytics"},{"title":"Evals","sidebarTitle":"Evals","href":"/documentation/monitor/evals"},{"title":"Alerts","sidebarTitle":"Alerts","href":"/documentation/monitor/alerts"}]},{"group":"Manage account","icon":"settings","pages":[{"title":"Members","sidebarTitle":"Members","href":"/documentation/manage-account/members"},{"title":"API key","sidebarTitle":"API key","href":"/documentation/manage-account/api-key"},{"title":"Billing","sidebarTitle":"Billing","href":"/documentation/manage-account/billing"},{"title":"Call limits","sidebarTitle":"Call limits","href":"/documentation/manage-account/call-limits"},{"group":"Ringg Spaces","pages":[{"title":"Ringg Spaces","sidebarTitle":"Overview","href":"/documentation/manage-account/ringg-spaces/overview"},{"title":"Create and manage Ringg Spaces","sidebarTitle":"Create and manage","href":"/documentation/manage-account/ringg-spaces/create-and-manage"},{"title":"Ringg Spaces by API","sidebarTitle":"Ringg Spaces by API","description":"Manage a Ringg Space family with the primary workspace's API key: create spaces, read the family, allocate concurrency and reallocate credit limits or balances.","href":"/documentation/manage-account/ringg-spaces/ringg-spaces-by-api"}]}]},{"group":"Ringg Labs","icon":"flask-conical","pages":[{"group":"Parrot STT","pages":[{"title":"Parrot STT Python SDK","sidebarTitle":"Python SDK","href":"/documentation/ringg-labs/parrot-stt/python-sdk"},{"title":"Parrot STT on TrueFoundry","sidebarTitle":"TrueFoundry","description":"Add Ringg AI's Parrot speech-to-text to the TrueFoundry AI Gateway as a Custom Endpoint, then transcribe audio through the gateway's proxy-api path.","href":"/documentation/ringg-labs/parrot-stt/truefoundry"}]}]}]},{"tab":"Analytics platform","pages":[{"title":"Analytics platform","href":"/analytics-platform/introduction"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction/quickstart"}]},{"tab":"Resources","menu":[{"item":"MCP server","description":"Let Claude, ChatGPT or Cursor work in your workspace, or search these docs","pages":[{"title":"MCP server","href":"/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants"}]},{"item":"Learn","description":"Lessons that build a payment-reminder system end to end","pages":[{"title":"Learn","href":"/resources/learn/all-lessons"}]},{"item":"Security","description":"How Ringg protects your data, and what to do on your side","pages":[{"title":"Security","href":"/resources/security/security"}]},{"item":"Changelog","description":"New features, API changes and new guides","pages":[{"title":"Changelog","href":"/resources/changelog/changelog"}]}],"pages":[{"title":"Resources","href":"/resources/mcp-server/docs-mcp-server/mcp-for-ai-assistants"}]}]},"basePath":"","title":"Parrot STT Python SDK | Ringg AI","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-BXrZabKK.js","DynamicMarkdown-CtasenyM.js","zoom-image-lightbox-C5F0mVLH.js","lightbox-handle-r17bVUz3.js","Markdown-CwLx6PAg.js","clsx-C3kuh_dz.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CmKHfscc.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-U3mI6Ljh.js"]}