feat: Add TTS slide narration powered by CAMB AI#486
Open
neilruaro-camb wants to merge 1 commit intopresenton:mainfrom
Open
feat: Add TTS slide narration powered by CAMB AI#486neilruaro-camb wants to merge 1 commit intopresenton:mainfrom
neilruaro-camb wants to merge 1 commit intopresenton:mainfrom
Conversation
Add text-to-speech narration for presentation slides using CAMB AI's MARS models. Converts existing speaker notes to playable audio with content-hash caching, auto-play in presentation mode, and per-slide or batch generation. - Backend: TTSService with camb-sdk, API endpoints, audio file serving - Frontend: useSlideAudio hook, playback controls, narration buttons - Config: CAMB_API_KEY and CAMB_TTS_MODEL env vars
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
Hi there! We are the team at CAMB AI, the AI localization engine trusted by brands like the Premier League, NBA, and NASCAR for high-quality voice and audio solutions. We would love to contribute a TTS (text-to-speech) narration feature to Presenton.
This PR adds the ability to convert existing speaker notes into playable audio narration using CAMB AI's MARS speech models. The feature is fully optional and gracefully hidden when no API key is configured.
What this adds
TTSServiceusingcamb-sdkwith content-hash caching (same text = same cached audio file), plus/tts/generateand/tts/generate-presentationAPI endpointsuseSlideAudiohook for audio playback state, play/pause/auto-play controls in presentation mode (withPkeyboard shortcut), per-slide narration button in the slide toolbar, and a "Narration" button in the header for batch generationCAMB_API_KEY,CAMB_TTS_MODEL) added todocker-compose.yml,nginx.conf, andnext.config.mjsHow it works
CAMB_API_KEY(free to get from CAMB AI Studio)Design decisions
app_data/audio/, keyed by a SHA-256 hash of the text contentCAMB_API_KEYis not set, all narration UI elements are hidden and the rest of the app works exactly as beforeFiles changed
services/tts_service.py,endpoints/tts.py,hooks/useSlideAudio.tspyproject.toml,get_env.py,asset_directory_utils.py,router.py,main.py(backend)presentation-generation.ts,slide.ts,PresentationMode.tsx,PresentationPage.tsx,SlideContent.tsx,PresentationHeader.tsx(frontend)docker-compose.yml,nginx.conf,next.config.mjs(config)Testing
mars-flashmodel, also supportsmars-proandmars-instructWe would be happy to make any adjustments to better fit the project's direction. Thank you for considering this contribution!