Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎙️ Dramatic Narrator

Turn plain text into a cinematic experience narrated by your own AI-cloned Morgan Freeman. Built with ollama for local LLM reasoning and fish_audio_sdk for ultra-realistic voice cloning.

🎧 Listen to a sample narration:
👉 Click to play

Watch demo

📍 Project Context

This project is part of my exploration into generative AI and voice cloning. I'm combining two powerful technologies to create a cinematic narration experience.

  • 🧠 Ollama is used (mainly gemma3:1b) for generating dramatic and structured narration based on user context input and pre-defined prompts.

  • 🗣️ Fish Audio SDK brings the narration to life by cloning a real voice — in this case, the iconic Morgan Freeman — from a few .wav references.

  • 🔊 The result is a high-quality .mp3 audio file.

Everything runs locally, except for voice synthesis via Fish Audio's cloud API (mostly not Free).


📂 Project Structure

dramatic-narrator/
.
│
├── imgs/ # Image for the fish audio model cover + readme file
├── narration/
    .
    ├── __init__.py  # Makes the 'narration' dir a Python package
    ├── narrative_generation.py  # Uses Ollama to generate cinematic narration from context
    ├── text_to_speech.py  # Sends generated text + model ID to Fish Audio to synthesize speech
    └── voice_cloning.py   # Clones a sample voice from reference audio
├──
├── ollama/ # Ollama setup and helpers to call local models
├── utils/ # Helper utilities
├── voices/ # Reference voice samples to clone (.wav)
├── .env.example # Example env file (API key, etc.)
├── .gitignore
├── main.py # Main entry point
├── output.mp3 # Final generated narration with the cloned voice
├── README.md # You're here
└── requirements.txt # Python dependencies for setting up the environment       

🚀 How to Run

1. Install dependencies

pip install -r requirements.txt

2. Set up .env

Create a .env file using the example:

cp .env.example .env

Then add your Fish Audio API key:

FISH_AUDIO_API=your_api_key_here

3. Add Voice Samples

Place .wav files of the target voice in the voices/ folder.

Example:

voices/
├── morgan1.wav
├── morgan2.wav

4. Add Image

Place a cover image (e.g., face of Morgan Freeman) in the imgs/ folder:

imgs/
└── morgan-freeman.jpg

5. Run the Narrator

python main.py

The tool will:

  • Generate a narration based on your context (ex: WW3 with a crazy Trump, Putin and Kim Jong Un)

  • Clone the voice

  • Produce an output.mp3 file

  • Play the file automatically

🔉 Voice Samples

The reference .wav files used to clone Morgan Freeman’s voice were obtained from SampleFocus — the easiest way to find the perfect audio sample. These samples were used strictly for educational and experimental purposes.

🧑‍💻 Author

Built by ilyesBoukraa, hope I helped you! — feel free to fork or contribute!

About

Turn plain text into a cinematic experience narrated by your own AI-cloned Morgan Freeman.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages