How to Add Text-to-Speech to WordPress with Our API?

By PlayN57 editorial team · Updated 2026-11-18

This guide shows WordPress publishers how to add natural-sounding audio to articles using EchoPress, turning static text into engaging audio files that keep readers on your site longer. We cover practical workflows, from retrieving your API key to generating speech for long-form content, ensuring you understand character limits and voice selection without needing complex infrastructure.

You will learn to integrate audio via plugins or custom cURL code, manage costs accurately, and optimize playback performance. Whether you are improving accessibility for commuters or simply enhancing the user experience, this page provides the specific steps and technical details you need to successfully deploy text-to-speech on your blog.

How to Add Text-to-Speech to WordPress with Our API?

Frequently asked questions

What is the best voice for a business blog?

Q: Which voice is best for a business blog? A: No single voice is best, as all eight presets support all 23 languages. For business content, atlas offers a neutral, news-style tone, while milo provides a friendly, conversational voice. You can choose any preset, like aria or nova, depending on your brand’s specific style.

Do I need technical skills to add audio to WordPress?

You can use the OpenAI SDKs by changing the base_url to https://api.playn57.com/v1. Alternatively, use plain HTTP requests with your API key. Since there is no official EchoPress WordPress plugin, you will need to integrate the API manually or use a generic HTTP client library in your theme.

Can I use the API to convert old blog posts?

Yes, you can convert existing text. Send your article content via POST to the speech endpoint. The API handles texts up to 4096 characters per request. For longer posts, split the text into parts and join the resulting audio files to create a complete audio version of your legacy content.

How do I handle images or links in the text?

The API processes plain text only. It does not support SSML, so images and HTML links are not rendered in the audio. You should strip HTML tags or replace links with readable text before sending the input to the API to ensure clear and coherent audio generation.

Is the generated audio SEO friendly?

The generated audio files are standard formats like mp3 or wav, which search engines can index. However, the API does not automatically generate transcripts or metadata. You should manually add relevant alt text and captions to your WordPress posts to ensure the audio content is accessible and optimized for search engines.

Can I change the voice after generating?

No, the voice is fixed at the time of generation. Each request produces a unique audio file based on the specified voice, model, and speed. To change the voice, you must send a new request with the desired voice parameter and receive a new audio file.

How long does it take to generate a 2,000-word article?

Generation takes roughly real time, averaging 25 characters per second. A 2,000-word article contains approximately 10,000 characters, taking about 6-7 minutes to generate. Requests are processed sequentially, so under load, your request may wait in a queue, potentially increasing the total time.

Do I need to store the audio files on my server?

The API returns the audio file in the response but does not store it. You are responsible for downloading and storing the generated files on your WordPress media library or external storage. There is no built-in storage or CDN provided by the API service itself.

Can I use the API for newsletters?

Yes, you can send any text up to 4096 characters per request. For longer newsletters, split the content into multiple requests and join the audio files. The API supports various formats like mp3 and wav, which are widely compatible with email clients and newsletter platforms.

What happens if my blog post changes?

The API does not track your blog posts. If the text changes, you must send the updated text to the API to generate a new audio file. The old audio file remains unchanged unless you manually replace it in your WordPress site with the newly generated version.

Is there a limit on the number of voices I can use?

No, you can use any of the 8 available voices (aria, nova, luna, sage, felix, milo, atlas, orion) in your requests. You can switch voices dynamically for each request based on the content type or audience preference without any additional limits or fees.

Can I control the speed of the audio for better comprehension?

Yes, you can adjust the speed between 0.25 and 4.0. The speed parameter is included in the JSON body of your POST request to the speech endpoint.

How do I embed the audio player in WordPress?

Since there is no official EchoPress plugin, you can use WordPress’s built-in audio shortcode or a custom HTML5 audio player. Upload the generated audio file to your media library, then embed it using the standard WordPress editor or by adding the HTML5 <audio> tag to your theme templates.

Does the API work with dynamic content?

Yes, you can send any text string to the API via the POST endpoint. You can integrate the API into your WordPress theme or plugin to fetch dynamic content and generate audio on the fly. Just ensure the text length does not exceed 4096 characters per request.

Why Add Audio to Your Blog?

Sound wave illustration for: Why Add Audio to Your Blog?

Adding audio to your WordPress blog transforms static text into an engaging experience that keeps readers on your site longer. By offering natural-sounding audio versions of your articles, you provide a valuable alternative consumption method that respects your audience’s time and context.

This approach provides an alternative consumption method that respects your audience’s time and context. Integrating our API ensures you can offer this feature without building complex infrastructure from scratch.

Improve Accessibility

Audio content makes your blog more inclusive for readers with visual impairments or reading difficulties. By providing an audio version, you ensure that everyone can access your content, regardless of their ability to read text on a screen.

Our TTS API generates clear, natural-sounding audio that respects the nuances of your writing. This simple addition demonstrates your commitment to an inclusive web experience, making your articles available to a wider range of readers.

  • Supports readers with dyslexia or visual impairments
  • Provides an alternative to screen readers
  • Enhances inclusivity without complex setup

Increase Dwell Time

When visitors listen to your content, they spend more time on your page, which positively impacts your SEO metrics. Higher dwell time signals to search engines that your content is valuable and engaging, potentially improving your rankings.

Audio allows users to consume your article while doing other things, such as cooking or cleaning. This extended engagement keeps your audience connected to your brand for longer periods, increasing the likelihood of return visits.

  • Boosts average session duration
  • Signals quality to search engines
  • Encourages deeper engagement with content

Reach Commuters

Many of your readers are likely commuting to work or traveling, where reading is less convenient. By offering audio versions, you capture this audience during their daily routines, allowing them to stay informed while on the go.

Whether they are driving, taking the train, or walking, audio content fits seamlessly into their lives. This convenience makes your blog a go-to resource for quick, digestible content that adapts to their mobile-first lifestyle.

  • Captures audience during daily commutes
  • Ideal for mobile and on-the-go reading
  • Converts travel time into content consumption

Preparation Steps

Sound wave illustration for: Preparation Steps

Before writing code, you need a key and a plan. This section covers the three essentials: acquiring your authentication token, understanding how character counting affects your budget, and selecting the right voice preset for your content’s tone.

Get Your API Key

Navigate to /get-api-key/ and sign in using your Google account or an email/password combination. Once registered, your unique tts-... key appears on the dashboard. This single active key authenticates all requests to https://api.playn57.com/v1. You can issue a new key at any time; the old one stops immediately.

  • Sign up via Google or email/password
  • Key appears on the /get-api-key/ dashboard
  • One active key per account; replace anytime

Understand Character Limits

Each API request accepts up to 4,096 characters of input text. Spaces and punctuation count toward this limit. For longer articles, you must split the text into chunks and join the resulting audio files. The typical generation speed is roughly real-time, so long posts may require queuing.

  • Max 4,096 characters per request
  • Spaces and punctuation count as characters
  • Split long texts and join audio files

Choose Your Voice

Select from eight presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion. Every voice supports all 23 languages, so you can match the tone to your article’s style. If your text uses Latin script but isn’t English, explicitly set the language field to avoid incorrect auto-detection.

  • 8 presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion
  • All voices speak all 23 supported languages
  • Set language parameter for non-English Latin text

Integration Methods

Sound wave illustration for: Integration Methods

Integrating EchoPress into your WordPress workflow is straightforward, whether you prefer a quick setup or granular control. You can use a dedicated plugin for automatic audio generation or write custom code to handle specific content types.

The API accepts standard JSON bodies, making it compatible with most WordPress themes and custom post types. This flexibility ensures you can offer audio versions of your articles without rebuilding your site’s infrastructure.

Using a Plugin

Plugins simplify the process by automating the API calls and player embedding. They typically handle character splitting and audio delivery, allowing you to focus on content rather than code.

Look for plugins that support EchoPress’s specific endpoints. Ensure the plugin respects your rate limits and handles errors gracefully to prevent broken audio players on your posts.

  • Automated text-to-audio conversion
  • Easy player embedding
  • Minimal configuration required

Custom Code with cURL

For precise control, use cURL to send POST requests to the EchoPress API. This method allows you to generate audio for specific posts or pages on demand.

You can integrate this into your theme’s functions.php or a custom plugin. This approach is ideal for publishers who need fine-tuned control over when and how audio is generated.

Server-Side Generation

Generate audio files on your server before they are requested by users. This method reduces latency for readers, as the audio file is already available when they visit the post.

Store the generated MP3 or WAV files in your media library. This approach is efficient for high-traffic blogs, as it minimizes API calls during peak reading times.

Handling Long Articles

Sound wave illustration for: Handling Long Articles

Long articles often exceed the 4,096-character limit per request. To handle this, you must split your blog post into smaller chunks before sending them to the API. Each chunk is processed independently, ensuring that even lengthy posts generate complete audio without truncation.

Once all parts are synthesized, you join the audio files into a single stream. This approach keeps individual requests fast and manageable, allowing your WordPress site to deliver seamless listening experiences without overwhelming the API during peak traffic.

Splitting Text into Chunks

Divide your content into segments of up to 4,096 characters, including spaces and punctuation. Use your site’s backend or a plugin to parse the article text into these fixed-size blocks. This ensures every request stays within the API’s limits and prevents errors during synthesis.

Maintain logical boundaries where possible, such as paragraph breaks, to avoid cutting mid-sentence. This improves the natural flow of the generated speech, making the final audio more pleasant for readers listening on the go or while multitasking.

  • Max 4,096 characters per request
  • Includes spaces and punctuation
  • Preserve paragraph breaks for flow

Joining Audio Files

After receiving individual audio files from the API, concatenate them in the correct order. Most WordPress plugins handle this automatically, but custom implementations may require server-side logic to merge the files seamlessly. Ensure the format matches your preferred output, such as MP3 or WAV.

The resulting file plays as a single continuous track. This method avoids gaps between sections, maintaining the narrative integrity of your article. Users hear a cohesive story rather than disjointed segments, enhancing the overall engagement and retention on your site.

  • Maintain correct sequence
  • Use consistent audio format
  • Avoid gaps between sections

Managing File Sizes

Longer articles result in larger audio files, which can impact bandwidth and loading times. Consider using compressed formats like MP3 or Opus to reduce file size without significantly sacrificing quality. This is crucial for maintaining fast page loads on mobile devices.

Monitor your storage usage if you cache generated audio locally. Implement a cleanup strategy for older posts or use a CDN to offload bandwidth. Balancing quality with file size ensures your site remains responsive even as your content library grows.

  • Use MP3 or Opus for compression
  • Implement CDN for offloading
  • Monitor storage usage regularly

Optimizing for Performance

Sound wave illustration for: Optimizing for Performance

Generate audio files server-side and store them as static assets to avoid repeated API calls for the same content. This approach drastically reduces latency for returning visitors and minimizes your monthly character consumption.

Caching Generated Audio

Store the resulting MP3 or WAV files in your WordPress media library or a dedicated CDN bucket. Invalidate the cache only when the source post is updated, ensuring users always hear the latest version without extra API overhead.

Lazy Loading Players

Defer audio player initialization until the user scrolls into view or clicks play. This prevents heavy JavaScript and audio requests from blocking the initial page render, keeping your Core Web Vitals healthy while improving perceived load speed.

Bandwidth Considerations

Audio files consume significantly more data than text. Use efficient formats like Opus or MP3 for standard quality, reserving FLAC or WAV only for high-fidelity needs. Compressing audio reduces server bandwidth costs and improves playback speed on mobile networks.

Voice Selection Guide

Sound wave illustration for: Voice Selection Guide

Choosing the right voice transforms static text into an engaging listening experience. EchoPress offers eight distinct presets, from the warm narration of Aria to the energetic promo style of Felix, ensuring your audio matches your content's intent.

Narrative vs Conversational

Narrative voices like Luna or Sage work best for storytelling or instructional posts, delivering a calm, professional tone. Conversational voices like Milo or Felix add energy, ideal for news updates or promotional articles where you want to keep readers engaged.

Matching Tone to Content

Align your voice choice with your article’s purpose. Use Atlas for neutral news or Orion for deep, documentary-style features. Ensure the voice reflects your brand’s personality without overpowering the written content.

Testing Different Voices

Generate short samples using your $0.50 trial credit to compare voices. Test how Aria’s clarity compares to Nova’s brightness on your specific articles. Adjust the speed setting between 0.25 and 4.0 to find the optimal listening pace for your audience.

  • Test Aria for clear narration
  • Try Felix for energetic promos
  • Use Milo for conversational tone
  • Adjust speed for readability
  • Compare Luna’s softness vs Nova’s brightness
  • Validate with sample audio files

Cost Management

Sound wave illustration for: Cost Management

Transforming long-form blog posts into audio is cost-effective, but understanding the pricing model helps avoid surprises. At $0.01 per 1,000 characters, you can predict expenses before generation begins, ensuring your content strategy remains sustainable.

Estimating Costs per Post

Calculate the character count of your article text, including spaces and punctuation. For a typical 2,000-word post, expect approximately 12,000–15,000 characters, costing roughly $0.12–$0.15 per audio file. This predictable rate allows you to budget accurately for high-volume publishing schedules.

  • Character count includes spaces and punctuation.
  • Standard posts cost cents, not dollars.
  • Predictable rates simplify financial planning.

Monitoring Usage

Track your consumption via the dashboard to see exactly how many characters you have used. Since failed requests are free, you only pay for successful synthesis. Regular checks help you identify if specific voices or formats are consuming resources faster than anticipated.

  • Dashboard shows real-time character usage.
  • Failed requests incur no charge.
  • Track spending per voice or format.

Budgeting for Growth

Start with the free trial credit of $0.50 to test your workflow. As your blog grows, top up via USDT on the TRON network for automatic, instant credit. With no monthly plans or minimum spend, you only pay for what you generate, scaling costs directly with your traffic.

  • Start with $0.50 trial credit.
  • Top up via USDT (TRC-20).
  • No monthly fees or minimums.
Cost Management

Common Challenges

Sound wave illustration for: Common Challenges

Integrating TTS into WordPress is straightforward, but small hurdles can affect audio quality if not handled correctly. Understanding these common issues helps you deliver a smooth listening experience for your readers without unexpected errors or awkward pauses.

Handling Special Characters

The API treats spaces and punctuation as characters, so emojis or complex symbols count toward your 4096-character limit. Ensure your text is clean before sending it to the endpoint to avoid truncation errors.

  • Spaces and punctuation count as characters.

Language Detection Issues

If you omit the language field, the system guesses based on script. Latin text defaults to English, which may mispronounce non-English words. Always set the language code explicitly for mixed-content posts.

  • Latin text defaults to English.

Speed Settings

Adjust the speed between 0.25 and 4.0 to match your content type. Faster speeds suit quick news updates, while slower rates improve clarity for instructional or storytelling posts. Test different voices to find the best fit.

Best Practices

Sound wave illustration for: Best Practices

Ensuring a cohesive experience across your blog requires aligning audio output with your visual identity. Consistent voice selection and branding help readers recognize your content instantly, whether they are reading on a desktop or mobile device.

Consistent Branding

Choose one voice that represents your brand’s tone for all articles. This consistency builds recognition and trust with your audience. Avoid switching voices randomly, as it can feel disjointed and unprofessional.

User Experience Tips

Place the audio player prominently at the top of your posts. Ensure the play button is large enough for touch targets on mobile devices. Allow users to easily skip or rewind sections without losing their place.

Use lazy loading for audio players to keep page speeds high. This ensures your site remains fast even when multiple audio files are present on the homepage or archive pages.

  • Keep the player interface minimal and intuitive.
  • Ensure accessibility compliance with standard audio controls.

SEO Benefits

Audio content can indirectly boost SEO by increasing dwell time. When users listen to your articles, they spend more time on your site, signaling quality to search engines. This engagement metric can improve your rankings over time.

Additionally, providing an audio version makes your content accessible to a wider audience, including those with visual impairments or learning disabilities, further enhancing your site’s value proposition.

Troubleshooting

Sound wave illustration for: Troubleshooting

Even the best integrations hit snags. This guide helps you resolve common API issues quickly so your audio posts stay live and your readers keep listening.

We cover authentication failures, rate limits, and playback glitches with concrete, actionable steps tailored for WordPress publishers.

API Key Errors

Ensure your key starts with tts- and is pasted correctly. If you issued a new key, the old one stops immediately. Use the exact key from your /get-api-key/ dashboard.

  • Verify the Authorization: Bearer tts-... header
  • Check for extra spaces in the key string
  • Re-issue a key if the old one failed

Rate Limit Exceeded

You are limited to 60 requests per minute. If you hit the cap, wait a moment before retrying. Pre-generating audio for long articles helps avoid bursts during peak traffic.

  • Limit is 60 req/min per key
  • Monitor usage in your dashboard
  • Pre-generate content during off-peak hours

Audio Playback Issues

Ensure your player supports the chosen format (mp3, wav, opus, flac, or pcm). If audio is silent, check that the response_format matches your player’s capabilities. Test with a short phrase first to isolate the issue.

  • Verify format compatibility (mp3/wav/opus)

Advanced Integrations

Sound wave illustration for: Advanced Integrations

Extend your WordPress workflow beyond simple embedding by integrating EchoPress directly into your publishing pipeline. Automate audio generation for new posts or trigger notifications when synthesis completes, keeping your content ecosystem synchronized without manual intervention.

Automating with Zapier

Connect your WordPress site to Zapier to trigger TTS generation whenever a new post is published. Pass the post title and content through the API, receiving an audio URL that can be automatically attached to the post metadata or saved to cloud storage.

  • Trigger on 'New Post Published'
  • Parse JSON response for audio URL
  • Update post meta fields automatically

Custom Webhooks

For precise control, use custom webhooks to notify your application when audio files are ready. This allows your WordPress theme to dynamically update the player with the new audio source without requiring a page refresh, ensuring a seamless listening experience for your readers.

Database Storage

Store generated audio URLs in your WordPress database or a dedicated object storage bucket. Link these URLs to specific post IDs in your custom tables, enabling fast retrieval and reducing API calls during subsequent page loads for your visitors.

  • Cache audio URLs in post meta
  • Reduce redundant API requests
  • Speed up page load times

Future-Proofing Your Site

Sound wave illustration for: Future-Proofing Your Site

Future-proofing your WordPress site with EchoPress means preparing for growth and evolving content needs. By leveraging our API, you ensure your blog can handle increasing traffic and content volume without complex infrastructure changes.

As your audience grows, your audio solution should scale effortlessly. Requests are processed sequentially, so under load a request may wait in a queue.

Scalability

EchoPress is built to handle surges in traffic. As your blog gains popularity, the API processes requests efficiently, maintaining consistent performance without requiring you to upgrade servers or manage load balancers.

  • Handle increased concurrent requests
  • No infrastructure upgrades needed
  • Consistent performance under load

Supporting New Languages

With 23 languages supported, you can easily expand your content to reach a global audience. If you start publishing in Spanish, German, or Japanese, the API adapts instantly without code changes.

Updating Voices

Stay current with voice options. We currently offer 8 presets. You can switch voices for new content easily to keep your audio fresh and engaging.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Each voice is based on licensed recordings, ensuring high-quality audio that fits your content's tone.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. openai-python on GitHub
  3. Python documentation
  4. MDN: Web Speech API
  5. TRON developer hub: TRC-20
  6. Tether (USDT)
  7. LibriTTS-R corpus (OpenSLR 141)
  8. Node.js documentation
  9. LibriTTS-R paper (arXiv 2305.18802)
  10. OpenAI API reference: create speech
  11. FFmpeg documentation
  12. ISO 639 language codes

More on this site