Skip to main content

Natural Persian Text-to-Speech. One command.

Project description

Persian Speech Runtime 🗣️

Natural Persian Text-to-Speech. One command.

Python Version License: MIT

A lightweight, production-ready runtime for converting Persian text into natural-sounding speech. Built on the efficient Piper TTS engine, it's designed to be simple to install and use.

🎧 Output Sample

"سلام به همگی!" (Hello everyone!)

🔊 Listen to the output sample

✨ Features

  • 🎯 Natural Persian Voice: Generates clear and natural-sounding Persian speech.
  • 🐍 Simple API: Use it in your Python projects with just one line of code.
  • 🖥️ Multi-Interface: Run it via CLI, as a local web server, or directly in Python.
  • ⚡ Fast & Lightweight: Optimized for runtime efficiency with minimal dependencies.
  • 📦 Easy Installation: Get started with a single pip command.

🚀 Install

pip install persian-speech
python install.py

The install.py script will automatically download and set up the necessary TTS model for you.

💡 Tip: After installation, you can clean up temporary files:

rm -r -force src/persian_speech_runtime/__pycache__, outputs, models/__pycache__ 2>$null
mkdir outputs 2>$null

🛠️ Usage

Command Line

Generate speech directly from your terminal:

speech "سلام به همگی" output.wav

Python API

Integrate TTS into your Python applications with a single function:

from persian_speech_runtime import talk

talk("سلام به همگی")

Local Web Server

Run a simple HTTP server to access the TTS engine via REST API:

python server.py
# http://localhost:8000/tts?text=سلام

The server will return the generated audio file.

📄 License

Distributed under the MIT License. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

persian_speech-1.0.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

persian_speech-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file persian_speech-1.0.0.tar.gz.

File metadata

  • Download URL: persian_speech-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for persian_speech-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5160937f11ee1c74659fd5e2814dc22422cd1109263f526368e58d35b11eaebf
MD5 7d24dd32e8a7304216861d50bbe13417
BLAKE2b-256 f484b2c4bee97146ee491357b2399d44dfda458275cef1c345ffb4f96ad1f32a

See more details on using hashes here.

File details

Details for the file persian_speech-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: persian_speech-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for persian_speech-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98c536ea6f6be5b56858294e967f0e08fcfcb24cdfebfdddb4a18e71d60cf9d2
MD5 8f1ade2ee2f2c86622de5bca9eee4a68
BLAKE2b-256 861c83eca084f8de05dc5a6972d7390bc59233ea2994299fe0c1f5f8eb58ed39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page