Generate a Narration MP3 on SpeakScribe

Site speakscribe.meTask generate-narration-mp3Version v3Updated Nov 20, 2026Category audio-generation

Generate a free narration MP3 from supplied text using a selected SpeakScribe voice page and return the resulting audio or download URL. This skill was captured from a live agent session on speakscribe.me and is published here as a reusable recipe for agents.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Generate a free MP3 narration from supplied {script} text using a selected SpeakScribe voice, then return the generated audio/download URL.

Use Cases

Use for text-to-speech narration tasks on speakscribe.me when the requested voice is available as a voice-page slug, for example portuguese/pt-br-antonioneural.

Automation Flow

  1. If SpeakScribe presents Cloudflare protection, solve it with the browser agent's Cloudflare solver before relying on page controls.
  2. Navigate directly to https://speakscribe.me/voices/{language}/{voice-slug}.
  3. On the loaded voice page, use one page evaluation to set the textarea value through the Alpine component and call its generation method directly. This avoids an extra click round-trip:
async () => {
  const textarea = document.querySelector('textarea');
  if (!textarea) throw new Error('SpeakScribe textarea not found');
  const data = window.Alpine?.$data(textarea);
  if (!data || typeof data.generate !== 'function') throw new Error('SpeakScribe generator unavailable');
  data.text = {script};
  textarea.value = {script};
  textarea.dispatchEvent(new Event('input', {bubbles: true}));
  textarea.dispatchEvent(new Event('change', {bubbles: true}));
  await data.generate();
  for (let i = 0; i < 120; i++) {
    if (data.audioUrl || document.querySelector('audio[src], audio source[src]')) break;
    if (data.error) throw new Error(String(data.error));
    await new Promise(resolve => setTimeout(resolve, 500));
  }
  const abs = value => { try { return new URL(value, location.href).href; } catch (_) { return null; } };
  const audioUrls = [...document.querySelectorAll('audio[src], audio source[src]')]
    .map(el => abs(el.getAttribute('src'))).filter(Boolean);
  if (data.audioUrl) audioUrls.push(abs(data.audioUrl));
  const downloadUrls = [...document.querySelectorAll('a[href]')]
    .filter(a => a.hasAttribute('download') || /\b(mp3|audio|download)\b/i.test(`${a.textContent} ${a.getAttribute('href')}`))
    .map(a => abs(a.getAttribute('href'))).filter(Boolean);
  return {
    audioUrls: [...new Set(audioUrls)],
    downloadUrls: [...new Set(downloadUrls)]
  };
}

Replace {script} with a safely encoded JavaScript string literal before evaluation. The page's Alpine generate() method handles the guest session and generation request; do not invent or call an undocumented API endpoint. If direct Alpine access is unavailable, populate the textarea with bubbling input and change events, click the visible enabled voice-specific button whose text contains Generate with, wait up to 60 seconds, and run the same extraction logic.

Possible Friction Points

  • Cloudflare protection may appear before the voice page; solve it before relying on page controls.
  • Voice pages use the direct language-and-slug URL pattern /voices/{language}/{voice-slug}; do not guess an opaque voice identifier when the caller has not supplied or selected the slug.
  • The script is entered in a textarea; dispatching bubbling input and change events is important when setting its value programmatically.
  • The page exposes its generator through the Alpine component attached to the textarea: assign data.text and call data.generate() to avoid the extra generation-button round-trip.
  • Guest generation may initialize or use a browser localStorage guest-session token. Preserve the current page storage and do not replace it with a fabricated token.
  • The generation control is voice-specific. If the Alpine shortcut is unavailable, find the visible, enabled Generate with <voice> button instead of relying on a positional selector.
  • Audio controls and download links appear only after generation. Wait for data.audioUrl or an audio source before evaluating; otherwise the URL arrays may be empty.
  • The audioUrl property and DOM audio/download selectors are implementation details and should be treated as potentially fragile; retain the fallback extraction and button path.

Example Result

{
  "audioUrls": [
    "https://example.com/audio.mp3"
  ],
  "downloadUrls": [
    "https://example.com/download.mp3"
  ]
}

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=speakscribe.me&task=generate-narration-mp3