Skip to main content
Tailor speak-mintlify to match your documentation’s unique needs and branding.

Audio Component Customization

The audio player component is fully customizable. Start with the provided template and modify it to match your design system.

Component Configuration

Specify your custom component in speaker-config.yaml:
speaker-config.yaml
The import path is relative to your documentation root.

Component Props Interface

Your component receives this props structure:

Example: Minimal Player

Create a simple, lightweight audio player:
/snippets/minimal-audio.jsx
Update config:
speaker-config.yaml

Example: Multi-Voice Tabs

Display voices as tabs instead of a dropdown:
/snippets/tabbed-audio.jsx

Example: Branded Player

Match your brand colors and style:
/snippets/branded-audio.jsx

File Pattern Customization

Custom File Patterns

Control which files get processed:

Using .speakignore

Create a .speakignore file at your repository root:
.speakignore
Use .speakignore to reduce API costs by excluding pages that don’t benefit from audio narration.

Voice Configuration Strategies

Strategy 1: Single Professional Voice

Best for: Corporate docs, consistent brand voice
speaker-config.yaml

Strategy 2: Multiple Personality Voices

Best for: Developer tools, friendly tone
speaker-config.yaml

Strategy 3: Multilingual Support

Best for: International audience
speaker-config.yaml

Strategy 4: Role-Based Voices

Best for: Tutorial content, conversational docs
speaker-config.yaml

S3 Path Customization

Customize how audio files are organized in S3:
Update in config:
speaker-config.yaml
S3 path prefix can only be set via CLI flag, not in speaker-config.yaml.

Advanced Workflows

Conditional Generation

Generate audio only for specific branches:
.github/workflows/tts-conditional.yaml

Incremental Updates

Only process changed files:
.github/workflows/tts-incremental.yaml
speak-mintlify already tracks content hashes and only regenerates when content changes. This workflow is for advanced use cases with large documentation sets.

Multi-Environment Setup

Use different configurations for staging and production:
speaker-config.dev.yaml

Styling and Theming

Tailwind CSS Integration

The default component uses Tailwind. Customize with your theme:
/snippets/audio-transcript.jsx

CSS Modules

For scoped styles:
/snippets/styled-audio.jsx
/snippets/audio.module.css

Dark Mode Support

Handle dark mode with Tailwind:

Troubleshooting Customization

  • Check import path is correct in speaker-config.yaml
  • Verify file exists at specified path
  • Ensure component is exported (named export)
  • Check component name matches exactly (case-sensitive)
  • Verify component accepts voices prop
  • Check prop structure matches interface
  • Use --verbose to see generated component code
  • Test component independently first
  • Ensure Tailwind processes your component file
  • Check CSS imports are working
  • Verify class names don’t conflict
  • Test in browser dev tools
  • Test pattern with glob tool: npx glob "your-pattern"
  • Ensure pattern is quoted in CLI
  • Check .speakignore isn’t excluding files
  • Use --verbose to see matched files

Best Practices

1

Start with the default component

Modify the provided audio-transcript.jsx rather than building from scratch.
2

Test locally first

Use --dry-run to preview changes before generating audio.
3

Keep components simple

Focus on core functionality. Complex interactions can impact performance.
4

Support accessibility

Include ARIA labels, keyboard navigation, and screen reader support.
5

Optimize for mobile

Ensure audio player works well on touch devices.
6

Version your components

Track component changes in git for easy rollback.

Next Steps

CI/CD Integration

Automate customized workflows

Fish Audio

Configure voices for your custom player