English / 简体中文
TTS Azure Web is an Azure Text-to-Speech (TTS) web application built with Next.js 15 and React 19. Fine-tune the output speech results using Speech Synthesis Markup Language (SSML). It allows you to run it locally or deploy it with a single click using your Azure Key.
This application is ideal for those looking to minimize setup while experiencing the full capabilities of Azure TTS.
Live demo: https://tts.femoon.top
Get your API Key
# Build the Docker image
docker build -t tts-azure-web .
# Run with environment variables
docker run -p 3000:3000 \
-e SPEECH_KEY=your_azure_key \
-e SPEECH_REGION=your_azure_region \
tts-azure-web
# Install yarn (if not already installed)
npm i -g yarn
# Install dependencies
yarn
# Build for production
yarn build
# Start production server
yarn start
Before starting development, create a .env.local file at the project root with your Azure credentials:
# Required: Azure Cognitive Services credentials
SPEECH_KEY=your_azure_key
SPEECH_REGION=your_azure_region
# Optional: Application configuration
NEXT_PUBLIC_MAX_INPUT_LENGTH=4000 # Maximum text input length (default: 4000)
# Optional: Next.js configuration
NEXT_TELEMETRY_DISABLED=1 # Disable Next.js telemetry
Common Azure regions: eastus, westus2, eastasia, westeurope, etc.
# Install yarn (if not already installed)
npm i -g yarn
# Install dependencies
yarn
# Start development server (localhost only)
yarn dev
# Or start development server accessible on LAN
yarn lan-dev
yarn dev # Start development server
yarn lan-dev # Start development server on LAN (0.0.0.0)
yarn build # Build for production
yarn start # Start production server
yarn lint # Run ESLint with auto-fix (max 0 warnings)
app/
├── [lang]/ # Internationalized routes (en/cn)
│ ├── ui/ # UI components
│ │ └── components/ # Reusable components
│ └── page.tsx # Main application page
├── api/ # API routes
│ ├── audio/ # TTS audio generation
│ ├── token/ # Azure authentication
│ └── list/ # Voice list fetching
└── lib/ # Utilities and stores
├── stores/ # Zustand state management
├── hooks/ # Custom React hooks
└── i18n/ # Internationalization config
This project follows the Conventional Commits specification:
feat: Add new functionsfix: Fix issues/bugsperf: Optimize performancestyle: Change code style without affecting functionalityrefactor: Refactor coderevert: Undo changestest: Test related, does not involve business code changesdocs: Documentation and annotationschore: Update dependencies/modify configurationci: CI/CD related changesThis project is licensed under the MIT License - see the LICENSE file for details.
$ claude mcp add tts-azure-web \
-- python -m otcore.mcp_server <graph>