.speakignore file lets you exclude specific files or directories from TTS audio generation. It uses gitignore syntax for pattern matching.
Creating .speakignore
Create a.speakignore file in your documentation directory:
Syntax
.speakignore uses the same pattern syntax as .gitignore:
#for comments*matches any sequence of characters**matches nested directories!negates a pattern (include instead of exclude)/at the end matches directories only
Common Patterns
Exclude Directories
.speakignore
Exclude Specific Files
.speakignore
Exclude by Pattern
.speakignore
Example .speakignore
Here’s a complete example:.speakignore
How It Works
When you runspeak-mintlify generate, the tool:
- Searches for MDX files using the
--patternglob (default:**/*.mdx) - Filters out files matching
.speakignorepatterns - Only generates TTS audio for remaining files
Excluded files are completely skipped - no API calls, no S3 uploads, no MDX modifications.
Testing Your Patterns
Use the--dry-run flag to preview which files will be processed:
- Files that will be processed
- Files that will be skipped
- Reason for skipping (e.g., “matched .speakignore pattern”)
Advanced Patterns
Include Exceptions
Exclude a directory but include specific files:.speakignore
Multiple Patterns
Combine multiple exclusion rules:.speakignore
Exclude by Depth
Exclude files at specific directory depths:.speakignore
Use Cases
Skip API Reference Pages
Skip API Reference Pages
API reference pages are often auto-generated and may not need narration:
.speakignore
Skip Snippets and Components
Skip Snippets and Components
Exclude reusable snippets that aren’t standalone pages:
.speakignore
Skip Draft Content
Skip Draft Content
Exclude work-in-progress documentation:
.speakignore
Skip Internal Documentation
Skip Internal Documentation
Exclude docs meant only for internal team use:
.speakignore
Pattern Matching Priority
Patterns are evaluated in order from top to bottom:.speakignore
guides/getting-started.mdx will be included because the ! pattern comes after the exclusion.
Debugging
If files aren’t being excluded as expected:Check pattern syntax
Ensure you’re using correct gitignore syntax:
dir/**excludes all files indir/dir/*only excludes direct children*.mdxmatches at any level
Performance Benefits
Using.speakignore effectively can:
- Reduce API calls to Fish Audio
- Lower S3 storage costs
- Speed up generation time
- Keep your docs cleaner (no audio on pages that don’t need it)
Next Steps
Speaker Config
Configure voices and components
CLI Reference
View all CLI commands and options
