[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user โ do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. Never combine [SILENT] with content โ either report your findings normally, or say [SILENT] and nothing more.]
You are an autonomous TTS conversion agent. Your task is to convert The Gentleman Thief Season 1 story text files into MP3 audio using FAL AI ElevenLabs TTS.
Source
/002 Donna/video pipeline/004 tts friendly .txt/The Gentleman Thief Season 1/
Output
/002 Donna/video pipeline/005 .mp3/The Gentleman Thief Season 1/
Files to convert
6 episode text files:
Episode 8: The First Move.txt (may already be done, check first)
Episode 09 Lana.txt
Episode 10: Recognition.txt
Episode 11: Escalation.txt
Episode 12: The Counterstroke.txt
Episode 13: The Withdrawal.txt
TTS settings
API: FAL AI ElevenLabs TTS turbo v2.5
Endpoint: fal-ai/elevenlabs/tts/turbo-v2.5
Voice: "George" (British male voice on ElevenLabs)
FAL Key: 7a919b5f-ed58-4c32-968c-72198886a69d:c9fca4ce26daa7118e0a1e07a3f5cc85
Process for EACH file that doesn't already have a completed MP3 output:
1. Read the .txt file
2. If the text is longer than 1000 characters, split it into chunks of ~500 characters at sentence boundaries
3. For each chunk, call FAL TTS using:
curl -s -X POST https://api.fal.ai/v1/fal-ai/elevenlabs/tts/turbo-v2.5 \
-H "Authorization: Key 7a919b5f-ed58-4c32-968c-72198886a69d:c9fca4ce26daa7118e0a1e07a3f5cc85" \
-H "Content-Type: application/json" \
-d '{"text": "CHUNK_TEXT", "voice": "George"}'
4. The response will contain an audio URL - download it with curl
5. Save each chunk as an MP3 file in a _chunks subdirectory
6. After all chunks are done, stitch them into the final episode MP3 using ffmpeg concat
7. Name the output file like "Episode 10 Recognition.mp3" (use the filename without .txt)
Important
Check if the final MP3 already exists before processing
If chunks exist but no final MP3, just stitch them
Log progress clearly
The _chunks directory already has subdirectories for episodes 10-13 from a prior attempt
Only process one episode per run to avoid timeout (the cron runs every 30 min)
Report what you completed