Splyce uses the ElevenLabs Instant Voice Clone API to generate voiceover in the character’s voice. A reference audio or video file is uploaded to ElevenLabs, which returns aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/rushilkukreja/hoohacks/llms.txt
Use this file to discover all available pages before exploring further.
voice_id that is cached in-process for the lifetime of the server.
How voice cloning works
When/api/generate-ad-video is called for the first time in a server process:
- Splyce reads the reference file from
VOICE_REFERENCE_PATH(default:wolf_voice.mp4at the project root). - It sends the file to
https://api.elevenlabs.io/v1/voices/addas multipart form data. - ElevenLabs returns a
voice_idfor the cloned voice. - The
voice_idis cached in memory. All subsequent voiceover requests in the same process reuse this ID without re-uploading the file.
"Oh wow, a {product_name}." — generated at video generation time with the matched product name substituted in.
Default reference file
Place a file namedwolf_voice.mp4 at the project root:
Custom reference file
To use a different file, setVOICE_REFERENCE_PATH to its absolute or relative path:
Fallback behavior
Splyce degrades gracefully if voice cloning is unavailable:| Condition | Behavior |
|---|---|
Reference file exists, ELEVENLABS_API_KEY set | Clone voice from file, cache voice_id |
| Clone fails (no file, API error, etc.) | Fall back to ELEVENLABS_VOICE_ID (default: 21m00Tcm4TlvDq8ikWAM) |
ALLOW_SILENT_VOICEOVER=1 and all voiceover fails | Insert a silent audio track instead of aborting |
No ELEVENLABS_API_KEY and ALLOW_SILENT_VOICEOVER not set | Request fails with an error |
Skipping voiceover entirely
If you want to test video generation without an ElevenLabs key, set:1, true, or yes for this variable. It will skip all TTS and voice-clone calls and splice in a silent audio segment instead. The merged video will otherwise be identical — scenes, timing, and frame edits are unaffected.