Add Typecast HTTP TTS service and foundational example
Summary
- Add an HTTP-based
TypecastTTSServicealigned with the official Typecast Text-to-Speech REST API - Expose the integration via
pipecat.services.typecast, include atypecastoptional dependency, and document new env vars for credentials - Add a foundational interruptible example that pairs Deepgram STT, OpenAI LLM, and Typecast TTS
What's New
Typecast TTS Service
- Implements
src/pipecat/services/typecast/tts.pyusing a sharedaiohttpclient; handles ISO 639-3 language mapping plusprompt/outputcontrols (emotion, intensity, pitch, tempo, format) as documented by Typecast - Streams WAV audio through the shared
_stream_audio_frames_from_iteratorhelper, integratesstart_ttfb_metrics/start_tts_usage_metrics, and enforces theaudio_format="wav"contract for raw PCM playback - Re-exports the service from
src/pipecat/services/typecast/__init__.pysopipecat.services.typecastmirrors other provider namespaces
Foundational Example
- Adds
examples/foundational/07z-interruptible-typecast-http.py, matching other HTTP samples with configurable transports, Deepgram STT, OpenAI LLM, and optionalTYPECAST_VOICE_IDoverrides - Manages all HTTP work inside a single
aiohttp.ClientSession, highlighting how to reuse the service within an interruptible pipeline
Configuration & Packaging
- Registers a
typecastoptional dependency group insidepyproject.tomlfor targeted installs - Updates
env.examplewithTYPECAST_API_KEY/TYPECAST_VOICE_IDso users know which secrets are required before running the sample or service
Usage Example
async with aiohttp.ClientSession() as session:
tts = TypecastTTSService(
api_key=os.environ["TYPECAST_API_KEY"],
aiohttp_session=session,
params=TypecastTTSService.InputParams(
prompt_options=PromptOptions(emotion_preset="happy", emotion_intensity=1.2),
),
)
We have a community integrations program: https://github.com/pipecat-ai/pipecat/blob/main/COMMUNITY_INTEGRATIONS.md
Do you work for the company that builds Typecast? If so, adding the community integration could be a great solution to adding support to Pipecat. Please let me know if you have any questions.
@sangwonl just making sure you saw my note above about adding Typecast to the Community Integrations program. Please check it out and let me know if you have any questions.
Hello, @markbackman. Sorry for the late reply. When you say to add it as a community integration, do you mean simply getting it listed on the page? I was wondering — is there any way it could be added as an official Pipecat service instead?
Thanks :)
Sorry for the late reply. When you say to add it as a community integration, do you mean simply getting it listed on the page?
Yes, that's the right page.
is there any way it could be added as an official Pipecat service instead?
Integrations take a lot of our time to maintain, so we're being really picky about new integrations for a bit. Starting as a community integration is a good path to get visibility and can still provide a path for a first-party integration that we help maintain, as the community demands inclusion into Pipecat. Does that make sense?
Thank you for the detailed explanation. That sounds like a reasonable approach. I’ll go ahead and try it as a community integration.
In that case, should I leave this PR open so it could be used later if there’s community demand for the 1st-party inclusion you mentioned, or would you prefer that I close it?
I'll close this out now since you're listed as a community integration. We can always reference this in the future if we want to port this to first party. Thanks again!