Summary
Add convenience methods for composing multi-step Deepgram API pipelines — STT → Audio Intelligence → TTS — as a single fluent chain, reducing boilerplate and making common multi-API workflows expressible in a few lines.
Problem it solves
Developers frequently need to chain Deepgram APIs together: transcribe audio, run intelligence analysis (sentiment, topics, entities), then synthesize a summary or response via TTS. Today this requires manually wiring together three separate API calls, handling intermediate data transformation, and managing error propagation across the chain. A pipeline composition helper would make these common patterns as simple as:
result = await (
deepgram.pipeline()
.transcribe(audio_source, model="nova-3")
.analyze(sentiment=True, topics=True, summarize=True)
.speak(model="aura-2", voice="asteria")
.run()
)
# result.transcript, result.intelligence, result.audio
This mirrors the operator-overloaded pipeline composition pattern becoming standard in AI frameworks, making Deepgram's multi-API workflows competitive in ergonomics.
Proposed API
from deepgram import DeepgramClient, Pipeline
client = DeepgramClient()
# Fluent pipeline builder
pipeline = (
client.pipeline()
.transcribe(source={"url": "https://example.com/audio.wav"}, model="nova-3", smart_format=True)
.analyze(sentiment=True, topics=True, summarize="v2")
.speak(text_from="summary", model="aura-2-en", encoding="mp3")
)
result = await pipeline.run()
# result.transcript: PrerecordedResponse
# result.intelligence: AnalyzeResponse
# result.audio: bytes (TTS output)
# Or partial pipelines
stt_result = await client.pipeline().transcribe(source=audio).run()
stt_intel = await client.pipeline().transcribe(source=audio).analyze(sentiment=True).run()
Acceptance criteria
Raised by the DX intelligence system.
Summary
Add convenience methods for composing multi-step Deepgram API pipelines — STT → Audio Intelligence → TTS — as a single fluent chain, reducing boilerplate and making common multi-API workflows expressible in a few lines.
Problem it solves
Developers frequently need to chain Deepgram APIs together: transcribe audio, run intelligence analysis (sentiment, topics, entities), then synthesize a summary or response via TTS. Today this requires manually wiring together three separate API calls, handling intermediate data transformation, and managing error propagation across the chain. A pipeline composition helper would make these common patterns as simple as:
This mirrors the operator-overloaded pipeline composition pattern becoming standard in AI frameworks, making Deepgram's multi-API workflows competitive in ergonomics.
Proposed API
Acceptance criteria
Pipelineclass supports.transcribe(),.analyze(), and.speak()stepsRaised by the DX intelligence system.