Task System
Audify’s task system lets you control how the LLM transforms your text before TTS synthesis. Each task uses a different prompt that instructs the LLM to produce a specific style of output.
Built-in Tasks
Task |
Description |
|---|---|
|
No LLM processing, direct TTS conversion |
|
Transform into an engaging audiobook script |
|
Transform into a comprehensive talk/podcast |
|
Create a concise audio summary |
|
Transform into a guided meditation script |
|
Transform into a classroom lecture |
List tasks
audify list-tasks
Use a built-in task
audify audiobook book.epub --task podcast
audify audiobook book.epub --task summary
audify audiobook book.epub --task meditation
Custom Prompt Files
Create a text file with LLM instructions and pass it with --prompt-file:
# Create a prompt file
cat > my-prompt.txt << 'EOF'
Transform the following content into a bedtime story.
Use gentle, soothing language. Simplify complex ideas.
Speak directly to the listener. End with a calming closing.
EOF
# Use the prompt
audify audiobook book.epub --prompt-file my-prompt.txt
The --prompt-file flag overrides any --task selection.
Validate a prompt file
audify validate-prompt my-prompt.txt
Writing Effective Prompts
A good custom prompt should:
Define the role – Tell the LLM what kind of writer/narrator it is.
Specify the output format – What should the final text look like?
Set the tone – Professional, casual, calming, energetic, etc.
Include constraints – What to include, what to exclude.
Audio-specific rules – No citations, no URLs, no visual references, only speakable text.
Example: Children’s story prompt
Transform the following content into an engaging story for children ages 8-12.
Use simple vocabulary and short sentences. Replace technical concepts with
relatable analogies. Include moments of wonder and excitement.
Rules:
- Use a warm, friendly narrator voice
- No citations, URLs, or academic references
- Replace numbers and statistics with descriptive language
- Only include text that should be spoken aloud
- Do not include any stage directions or meta-commentary
Example: News briefing prompt
Transform the following content into a concise news briefing.
Present the key facts clearly and objectively. Use the inverted
pyramid style: most important information first.
Structure:
- Lead: The most important fact in 1-2 sentences
- Body: Supporting details and context
- Background: Brief relevant history if needed
Rules:
- Write in present tense where possible
- No editorializing or opinion
- No citations or URLs
- Only include text that should be spoken aloud
Programmatic Task Registration
Developers can register custom tasks in Python:
from audify.prompts.tasks import TaskConfig, TaskRegistry
TaskRegistry.register(
TaskConfig(
name="bedtime_story",
prompt="Transform text into a gentle bedtime story...",
requires_llm=True,
llm_params={"temperature": 0.7, "top_p": 0.9},
output_structure="single",
)
)