Give your app voice input and spoken answers with PyAI Hear and Speak through AI SDK 7. Keep your existing LLM and use your PyAI key on the server.
Give users a way to speak to your app and hear its answers. Use Hear for
transcription and Speak for speech synthesis while keeping your existing
LLM, tools and application logic.
This integration calls PyAI directly. It does not require or establish a PyAI
listing in Vercel AI Gateway. Your PyAI account handles speech billing.
This makes two requests and consumes your PyAI quota or credit. Retries are
disabled so an uncertain billed request is not automatically submitted again.
Inspect the error before retrying. The example buffers a complete WAV and uses
synchronous transcription; it is not a realtime or streaming recipe.
Download the runnable example and its contract tests.
The same helper passed a live Speak → Hear round trip on October 25, 2026:
a 2.48-second WAV was transcribed correctly, with two successful requests and
no retries. This verifies the integration path; it is not a latency SLA or a
multilingual quality benchmark.
Hear supports 29 recognition languages with automatic detection. Speak’s stock
catalog spans 17 language groups. Select a suitable voice from
GET https://api.pyai.com/v1/voices and consult the
language table. Test your application’s accents,
audio conditions and preferred voices before production rollout.
Hear is $0.001 per audio minute; synchronous nonempty requests round up to a
started minute per request, and empty transcripts are free. Speak is $0.04 per
generated audio minute, metered by output duration. LLM and hosting costs are
separate. See current pricing.
PyAI’s default no-training warranty covers customer inputs and outputs for
shared/general model training. This is separate from retention; see the
privacy policy.