Add speech-to-text, text-to-speech, and ElevenLabs provider#472
Open
patrickdet wants to merge 1 commit intoagentjido:mainfrom
Open
Add speech-to-text, text-to-speech, and ElevenLabs provider#472patrickdet wants to merge 1 commit intoagentjido:mainfrom
patrickdet wants to merge 1 commit intoagentjido:mainfrom
Conversation
8e6ea10 to
3d7830c
Compare
Add speech-to-text transcription (ReqLLM.Transcription) and text-to-speech generation (ReqLLM.Speech) with provider-agnostic pipelines that work via prepare_request(:transcription/:speech). Add ElevenLabs as a speech-only provider with its unique API format (voice ID in URL path, xi-api-key header, format as query param). Integration tests verify TTS (ElevenLabs + OpenAI) and STT (Groq whisper via generate-then-transcribe pattern) against real APIs. Tagged :integration and excluded by default.
3d7830c to
9ad9d93
Compare
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
Adds TTS and STT to req_llm, plus an ElevenLabs provider.
Speech (
ReqLLM.Speech)Text-to-speech through the standard
prepare_request(:speech, ...)pipeline. Any provider that implements the operation works.Options: voice selection, speed, output format (mp3/wav/opus/flac/aac/pcm), language hints, provider-specific stuff like OpenAI's
instructionsfor gpt-4o-mini-tts.Transcription (
ReqLLM.Transcription)Speech-to-text. Takes file paths, raw binary, or base64 audio. Returns text with optional segment timing.
ElevenLabs provider
Speech-only. Their API is pretty different from OpenAI's
/audio/speech:/v1/text-to-speech/{voiceId})xi-api-keyheader instead of Bearer authtext/model_idinstead ofinput/modelvoice_settings(stability, similarity_boost, style, speed) go throughprovider_options. Auto-discovered at startup.Integration tests
Tagged
:integration, excluded by default. Tested against real APIs:ELEVENLABS_API_KEY=... OPENAI_API_KEY=... GROQ_API_KEY=... \ mix test --include integration test/req_llm/integration/Test plan