Skip to content

The moment it happens

Turn text into an MP3

Text you post to a link is read out by an OpenAI voice and the audio file is emailed to you.

Runs
The moment it happens
Apps
OpenAI
AI
Not needed
Access
API key

Send this to your assistant

Create a ClickRuntime automation: give me a link that turns any text I send into an MP3 using OpenAI's alloy voice, then emails me a link to the file.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A course creator publishes written lessons but learners keep asking for audio versions to listen to on a commute. Recording every lesson is a project in itself, and a free text-to-speech website means pasting text, waiting, downloading and uploading the file again. A support team wants a spoken status message for a voicemail system, and a developer wants audio notifications in an app. Each of them needs speech from text on demand.

When text is posted to your link, it is received immediately and sent to OpenAI's speech endpoint with the voice you picked. The MP3 that comes back is stored and its link is emailed to you, usually within a minute, so a lesson, a notification or a message becomes audio without opening a recording tool.

It also works for accessibility, narrated articles and audio previews of newsletters.

What you get out of it

  • Audio versions with no recording session

    A written lesson or article becomes listenable in a minute. That opens your content to people who learn by listening, and it costs far less than hiring a narrator. It also makes it easy to offer audio on every new lesson.

  • Any tool can request speech

    Because the input is a simple link, forms, scripts and other automations can all send text and get audio back. One setup serves the whole team and many different projects.

  • Accessibility improves quickly

    Spoken versions of pages help readers with low vision or dyslexia, and anyone who prefers listening. Providing them takes seconds once the link is in place. That makes written content reach commuters, drivers and people who learn best by listening, without extra recording sessions.

  • Consistent voice across everything

    Using the same voice setting for all requests means every clip sounds like the same narrator. That helps courses, product tours and voice messages feel professionally produced. Because audio comes back so fast, you can test several phrasings of an announcement and keep the one that sounds natural.

  • Fast iteration on wording

    If a sentence sounds awkward when spoken, you fix the text and send it again. Hearing the result within a minute makes tuning scripts quick compared with re-recording. This is far quicker than booking time, recording, editing and exporting again for every small edit.

How it works

What happens, step by step

  1. When text is sent to your ClickRuntime link, the automation starts straight away.

  2. An OpenAI voice reads the text aloud and creates an MP3.

  3. The file is saved to your Google Drive and you get an email with the text and a link to the audio.

Before it runs live

  • Connect OpenAI
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Turn text into an MP3just nowSucceeded
Email · Your MP3 is readyWelcome to the Acme support line… https://drive.google.com/file/d/…/view

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other OpenAI steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
text_to_speech_from_a_webhook.pyexample
import json
from clickruntime import on_event, credentials, http, notify

@on_event
def handle(event):
    text = (event.json or {}).get("text") or event.body
    if not text:
        return {"error": "nothing to read"}
    mp3 = http.post("https://api.openai.com/v1/audio/speech", timeout=120,
                    headers={"Authorization": f"Bearer {credentials.secret('OPENAI_API_KEY')}"},
                    json={"model": "tts-1", "voice": "alloy", "input": text[:4096]})
    mp3.raise_for_status()
    # Store the MP3 in Google Drive so the email can link to it.
    meta = json.dumps({"name": f"speech-{event.event_id}.mp3"})
    link = http.post("https://www.googleapis.com/upload/drive/v3/files",
                     params={"uploadType": "multipart", "fields": "webViewLink"},
                     headers={"Authorization": f"Bearer {credentials.connection('google', 'work')}"},
                     files={"metadata": ("m", meta, "application/json"),
                            "file": ("f", mp3.content, "audio/mpeg")}).json()["webViewLink"]
    notify.email_me("Your MP3 is ready", f"{text[:200]}\n\n{link}")
    return {"link": link}

FAQ

Common questions

Which voices and languages are available?
OpenAI's speech models offer a set of built-in voices, and they speak many languages from the same text. You pick the voice when you set it up, and the model chooses the pronunciation based on the language of the text.
Is there a length limit for the text?
The speech endpoint accepts a limited number of characters per request, around 4,000. Longer text can be split into sections that are converted separately, and the resulting MP3 links are listed in one email. Several speakers and moods can be mimicked by choosing different voices for different requests.
Does it need an OpenAI key?
Yes. The speech request uses an OpenAI API key that you provide, stored as a secret, and OpenAI charges for the characters converted. Cost for a short lesson is usually small, but it grows with volume.
What permissions does it need?
API key. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Turn text into an MP3” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.