feat(speech): integrate TTS/ASR cloud vendors into speech registry (task 21)#1255
Merged
doroteaMonaco merged 7 commits intomofa-org:mainfrom Mar 16, 2026
Merged
Conversation
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wire OpenAI, ElevenLabs, and Deepgram cloud speech adapters into the MoFA framework so that callers can configure and register them through a single, config-driven API surface rather than constructing each adapter manually.
Related Issues
Closes #1256 -- Integrate TTS/ASR from 2-3 Cloud Vendors
Context
The vendor adapters (OpenAI TTS/ASR, ElevenLabs TTS, Deepgram ASR) already existed in
mofa-integrationsand already implemented theTtsAdapter/AsrAdapterkernel traits. The gap was:mofa-integrationsSpeechAdapterRegistryfrom a config blockChanges
crates/mofa-sdk/Cargo.tomlmofa-integrationsas an optional dependencyopenai-speech,elevenlabs,deepgramcrates/mofa-sdk/src/lib.rs-- newpub mod speechTtsAdapter,AsrAdapter,AudioFormat,TtsConfig,AsrConfig,TtsOutput,AsrResult,VoiceInfo)SpeechAdapterRegistry,VoicePipeline,VoicePipelineConfig,VoicePipelineResult)SpeechConfig,SpeechProviderConfig) under all three feature flagsOpenAiTtsAdapter,OpenAiAsrAdapter,ElevenLabsTtsAdapter,DeepgramAsrAdapter)register_speech_adapters(registry, config)-- feature-gated factory that constructs and registers the correct adapter per provider entrycrates/mofa-integrations/src/speech/registry_builder.rs(new file)SpeechProviderConfig-- per-vendor config:provider,api_key,default_tts,default_asrSpeechConfig-- top-level config holding a list of provider entriesnew(),with_provider(),as_default_tts(),as_default_asr()#[serde(default)]on booleans for forward-compatible deserializationcrates/mofa-integrations/src/speech/mod.rsregistry_buildermodulecrates/mofa-integrations/tests/speech_example_tests.rsmod registry_builder_tests(4 tests): empty config, builder chain, JSON roundtrip, missing default flagsTesting
All tests pass without network access:
Live-API tests are marked
#[ignore]and require vendor API keys via environment variables:OPENAI_API_KEY=sk-... cargo test -p mofa-integrations \ --features openai-speech -- --ignoredBreaking Changes
None. All new API surface is additive. Existing code that does not enable the new feature flags is unaffected.
Checklist
#[non_exhaustive]optional = true#[ignore]d for CI