OpenAI.fm is an interactive demo to showcase the new OpenAI text-to-speech models. It is built with NextJS and the Speech API.
For more information about text-to-speech using the OpenAI API, check out our documentation.

Set up the OpenAI API:
If you're new to the OpenAI API, sign up for an account.
Follow the Quickstart to retrieve your API key.
Clone the Repository:
bash
git clone https://github.com/openai/openai-fm.git
2 options:
OPENAI_API_KEY environment variable globally in your systemOPENAI_API_KEY environment variable in the project: Create a .env file at the root of the project and add the following line (see .env.example for reference):bash
OPENAI_API_KEY=<your_api_key>
Run in the project root:
bash
npm install
If you want to use the sharing feature, you need to connect to a hosted postgres database.
You should set the environment variables in a .env file at the root of the project to connect to your database as shown in .env.example.
bash
POSTGRES_URL="postgresql://username:password@host:port/database_name"
This step is not needed to run the application and only affects the sharing feature.
bash
npm run dev
The app will be available at http://localhost:3000.
[!NOTE]
Be aware that if you deploy this app to a public server, you are responsible for any usage it may incur using your OpenAI API key.
You are welcome to open issues or submit PRs to improve this app, however, please note that we may not review all suggestions.
This project is licensed under the MIT License. See the LICENSE file for details.
$ claude mcp add openai-fm \
-- python -m otcore.mcp_server <graph>