Skip to main content
This guide walks you through adding voice narration to your Mintlify documentation from start to finish.

Prerequisites

Before you begin, make sure you have:
  • Node.js 18.0.0 or higher installed
  • A Mintlify documentation project with MDX files
  • A Fish Audio API key
  • An S3-compatible storage service (AWS S3, Cloudflare R2, MinIO, etc.)
1

Install speak-mintlify

Install speak-mintlify in your documentation repository:
You can also use npx speak-mintlify without installing to run commands directly
2

Create speaker-config.yaml

Create a speaker-config.yaml file at your repository root to configure voices and component settings:
speaker-config.yaml
Voice IDs come from Fish Audio. You can find available voices in your Fish Audio dashboard.
3

Configure environment variables

Create a .env file at your repository root with your API credentials:
.env
Never commit your .env file to version control. Add it to your .gitignore.
4

Create your audio component

Create an audio player component that matches the import path in your speaker-config.yaml.Your component needs to accept a voices prop with this structure:
Example usage in your MDX:
5

Generate audio for your docs

Run the generator on your documentation directory:
If your documentation is in a subdirectory:
Use --dry-run to preview what changes will be made before generating:
6

Verify the results

Check your MDX files to see the injected audio components. You should see something like:
Preview your documentation locally to test the audio playback.

Next steps

Installation

Learn about different installation options and requirements

Configuration

Explore advanced configuration options for voices, S3, and components

CI/CD Integration

Automate audio generation with GitHub Actions or other CI/CD tools

Commands

See all available commands and options

Common issues

Verify your S3 credentials in .env are correct and that your bucket has the proper permissions. Test with --verbose flag to see detailed error messages.
Make sure the component import path in speaker-config.yaml matches your actual component location. The component will be automatically injected at the top of each MDX file.
This usually means the hash tracking isn’t working properly. Check that you have write permissions in your documentation directory for the hash cache file.