Edge TTS Worker is a proxy service deployed on Cloudflare Worker that encapsulates Microsoft's Edge TTS service into an API interface compatible with OpenAI format. Through this project, you can easily use Microsoft's high-quality speech synthesis service without Microsoft certification.
Features:
Bypass access restrictions in mainland China, eliminating the Microsoft service certification step
Provides OpenAI compatible interface format
Completely free - based on Cloudflare Worker free plan
Secure and controllable - supports custom API keys
Multilingual support - Chinese, English, Japanese, Korean, etc.
Quick deployment - can be completed in minutes
Quick Deployment
- Create Worker
Log in to Cloudflare Dashboard
Go to Workers & Pages
Click Create Worker
Name the Worker (e.g., edge-tts) - Deploy Code
Delete the default code in the editor
Copy the code from worker.js and paste it
Click Save and deploy - Set API Key (optional)
In the Worker settings page, find Settings -> Variables
Click Add variable
Enter API_KEY as the name and the desired key as the value
Click Save and deploy - Configure Custom Domain (optional)
Prerequisites
Your domain is already hosted on Cloudflare
The DNS records of the domain are proxied through Cloudflare (proxy status is orange cloud)
Configuration Steps
In the Worker details page
Click the Settings tab
Find the Domain and Routing section
Click the Add button
Select Custom Domain
Enter the domain you want to use (e.g., tts.example.com)
Click Add Domain
Wait for the certificate deployment to complete (usually within a few minutes)
Once completed, you can access the service in the following two ways:
Workers domain: https://yourworkername.yourusername.workers.dev
Custom domain: https://tts.example.com
Note: The custom domain must use HTTPS, and Cloudflare will automatically provide an SSL certificate.