Skip to content

As many know, OpenAI offers a text-to-speech API service, but using it requires a foreign credit card for payment and a VPN, which isn't very convenient.

A developer on GitHub created a reverse-engineering project called ttsfm, which allows free local use by reverse-engineering openai.fm. Simply install and start ttsfm, then enter http://localhost:7000/v1 in the video translation software under TTS Settings → OpenAI TTS to start using it.

In the future, if too many people use this free method and OpenAI can't handle it, it will likely stop working. But for now, it's available—so take advantage while you can.

Here’s how to install and start it locally. You'll need Python 3.8+ installed. If you don't have Python yet, click here to learn how to set it up.

Download and Extract the Project Source Code

Go to the following address to download the zip file: https://github.com/dbccccccc/ttsfm

After downloading, extract it to a folder. For example, I extracted it to D:/python/openaitts. The extracted folder should look like this:

Install Dependencies and Start

  1. In the folder's address bar, type cmd and press Enter. In the opened terminal, run the command python -m venv venv and press Enter to create a virtual environment. If successful, a venv folder will appear in the directory, as shown below:

  1. Next, run the command venv\scripts\activate. After successful execution, (venv) will appear at the beginning of the cmd terminal:

  1. Continue by installing dependencies with pip install -r requirements.txt:

If the installation completes without red error messages, you're ready to start the service.

Run python server.py. If you see the following output, it means the service has started successfully:

Enter the API Address in pyVideoTrans and Generate Speech

Open pyVideoTrans, go to Menu → TTS Settings → OpenAI TTS.

  • In API URL, enter http://localhost:7000/v1
  • In SK, enter any text (do not leave it blank)
  • In the model text field, make sure to enter tts-1,tts-1-hd,gpt-4o-mini-tts
  • Select gpt-4o-mini-tts as the model
  • You can optionally enter a voice effect prompt, such as Speak in an angry tone

After filling in the details, test it out. Wait a moment, and if all goes well, you should hear the audio play.

Then, you can start using it on the main interface:

Given OpenAI's track record, this free method probably won't last long. Use it while you can!