DEV Community

VoiceDeveloper
VoiceDeveloper

Posted on

How to Host an AI Podcast Platform on Bluehost

Why Voice AI is the Future of Podcasting

Podcasting is no longer just about recording a mic and uploading a file.

Listeners now crave high‑quality narration, personalized voices, and the ability to generate episodes on demand.

That’s where voice AI comes in: text‑to‑speech (TTS) engines let you turn any script into a polished audio track, while voice cloning can make the narration sound like a real host—or even your favorite celebrity.

If you’re a developer looking to build an AI‑powered podcast platform, you’ll need a reliable, developer‑friendly stack.

Below I’ll walk you through setting up ElevenLabs for the TTS and voice‑cloning, building a tiny Flask app, and then deploying it on Bluehost—an affordable, beginner‑friendly host that still gives you full control over your code.


1. Get Started with ElevenLabs

ElevenLabs provides one of the most realistic TTS engines on the market, with dozens of voice models and a clean REST API.

Here’s a quick primer on how to sign up and pull your API key:

  1. Visit the ElevenLabs signup page: https://try.elevenlabs.io/kr07zfuqn1bp
  2. Create an account (free tier gives you 500 k characters/month).
  3. In the dashboard, copy your API key.

Tip: Store the key in an environment variable (ELEVENLABS_API_KEY) so you don’t hard‑code it in your codebase.


2. Build a Minimal Podcast Generator

Let’s create a simple Flask app that takes a title and a paragraph of text, feeds it to ElevenLabs, and streams the resulting MP3 back to the user.

2.1 Project Structure

podcast-ai/
├── app.py
├── requirements.txt
└── templates/
    └── index.html
Enter fullscreen mode Exit fullscreen mode

2.2 requirements.txt

Flask==2.3.3
requests==2.31.0
python-dotenv==1.0.0
Enter fullscreen mode Exit fullscreen mode

2.3 app.py

import os
import requests
from flask import Flask, render_template, request, send_file
from dotenv import load_dotenv
from io import BytesIO

load_dotenv()
app = Flask(__name__)
ELEVEN_API_KEY = os.getenv("ELEVENLABS_API_KEY")
ELEVEN_ENDPOINT = "https://api.elevenlabs.io/v1/text-to-speech/"

# Choose a voice ID from the ElevenLabs dashboard
VOICE_ID = "21m00Tcm4TlvDq8ikWAM"  # e.g., “Rachel”

@app.route("/", methods=["GET", "POST"])
def index():
    if request.method == "POST":
        title = request.form["title"]
        script = request.form["script"]

        # Prepare request payload
        payload = {
            "text": script,
            "voice_settings": {
                "stability": 0.5,
                "similarity_boost": 0.75
            }
        }

        headers = {
            "xi-api-key": ELEVEN_API_KEY,
            "Content-Type": "application/json"
        }

        # Call ElevenLabs API
        response = requests.post(
            f"{ELEVEN_ENDPOINT}{VOICE_ID}/stream",
            json=payload,
            headers=headers,
            stream=True
        )

        if response.status_code != 200:
            return f"Error: {response.text}", 500

        # Stream the MP3 back to the client
        mp3_stream = BytesIO(response.content)
        mp3_stream.seek(0)

        return send_file(
            mp3_stream,
            as_attachment=True,
            download_name=f"{title}.mp3",
            mimetype="audio/mpeg"
        )

    return render_template("index.html")

if __name__ == "__main__":
    app.run(debug=True)
Enter fullscreen mode Exit fullscreen mode

2.4 templates/index.html

<!doctype html>
<title>AI Podcast Generator</title>
<h1>Generate a Podcast Episode</h1>
<form method="post">
  <label>Title:<br>
    <input type="text" name="title" required>
  </label><br><br>
  <label>Script:<br>
    <textarea name="script" rows="10" cols="80" required></textarea>
  </label><br><br>
  <button type="submit">Create MP3</button>
</form>
Enter fullscreen mode Exit fullscreen mode

Run the app locally:

$ pip install -r requirements.txt
$ python app.py
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:5000 in your browser, enter a title and some text, and you’ll get a downloadable MP3 in a few seconds.


3. Prepare Your App for Production

Before deploying, make a few tweaks:

  1. Use a production WSGI server (e.g., Gunicorn) instead of Flask’s built‑in server.
  2. Add a .env file to store your API key securely.
  3. Create a Procfile if you ever switch to a platform that supports it.

Example Procfile for Heroku‑style deployment (optional):

web: gunicorn app:app
Enter fullscreen mode Exit fullscreen mode

4. Deploying to Bluehost

Bluehost is a great choice for developers who want an affordable, no‑frills host that still gives you full control via cPanel, SSH, and Git.

Here’s a quick checklist:

4.1 Sign Up

Get your account at https://bluehost.sjv.io/5k0d52.

The free trial and low‑price plans make it an easy entry point for hobby projects.

4.2 Set Up a Python Environment

  1. Log in to cPanel and open Terminal or use SSH.
  2. Create a virtual environment:
   python3 -m venv venv
   source venv/bin/activate
Enter fullscreen mode Exit fullscreen mode
  1. Upload your code via File Manager or Git.
  2. Install dependencies:
   pip install -r requirements.txt
Enter fullscreen mode Exit fullscreen mode

4.3 Configure the Web App

  1. In cPanel, go to Setup Python App.
  2. Choose the Python version (3.9+).
  3. Point the application root to your project folder.
  4. Set the WSGI entry file to app.py.
  5. Add environment variables:
    • ELEVENLABS_API_KEY = your key
  6. Start the app.

4.4 Point a Domain

If you have a domain, simply point the A record to Bluehost’s IP or use the Addon Domains feature.

You’ll get a public URL like https://yourpodcast.ai.

4.5 Test It Out

Navigate to your domain, fill in the form, and download the generated MP3.

Everything should work just as it did locally.


5. Scaling and Next Steps

  • Add a database (MySQL or PostgreSQL) to store episode metadata.
  • Integrate a front‑end framework (React, Vue) for a richer UI.
  • Use background jobs (Celery) to pre‑generate episodes.
  • Deploy to a container platform (Docker on DigitalOcean) if you hit traffic limits.

6. Frequently Asked Questions

Question Answer
Do I need a paid plan on ElevenLabs? The free tier is generous; upgrade only if you hit the 500 k‑character limit.
Can I host on Bluehost for free? Bluehost doesn’t have a free tier, but the lowest plan starts at $2.95/month and includes 1 GB SSD.
Is Bluehost secure? Yes, it provides SSL certificates, DDoS protection, and regular backups.
Can I use SSH? Absolutely. Bluehost offers SSH access on most plans.

7. Wrap‑Up & Call‑to‑Action

You now have a working AI podcast platform: ElevenLabs gives you world‑class TTS, and Bluehost gives you an affordable, developer‑friendly host to bring it to life.

If you’re ready to start generating episodes in minutes and keep costs low, sign up for ElevenLabs at https://try.elevenlabs.io/kr07zfuqn1bp and get your Bluehost account today at https://bluehost.sjv.io/5k0d52.

Happy podcasting—and happy coding!

Top comments (0)