Skip to main content

📦 pyespeakr (example documentation)

Overview

pyespeakr is a lightweight Python wrapper around the espeak speech synthesis engine. It allows you to easily convert text into speech, read text files aloud, and save spoken audio to a file using simple Python functions.

It is designed for Linux/Termux environments where espeak is installed.


⚙️ Requirements

Python 3.7+

espeak installed on system

Install espeak (Linux / Termux):

sudo apt install espeak


🚀 Installation

If published on PyPI:

pip install pyespeakr


📌 Features

Text-to-speech (say)

Read text files aloud (open_file)

Save speech to audio file (save_to_file)

Adjustable voice, speed, volume, and pitch


🔊 Usage

  1. Speak text

import pyespeakr

pyespeakr.say("Hello world")


  1. Change voice settings

pyespeakr.say( "Hello from Python", voice="en+m3", speed=180, volume=100, pitch=60 )


  1. Read and speak a file

pyespeakr.open_file("text.txt")

With custom settings:

pyespeakr.open_file( "text.txt", speed=160, voice="en+m3" )


  1. Save speech to audio file

pyespeakr.save_to_file( "This will be saved as audio", "output.wav" )


⚙️ Parameters

Common parameters

Parameter Type Default Description

voice str "en+m3" Speech voice speed int 175 Speech speed volume int 100 Audio volume pitch int 50 Voice pitch


📁 Functions

say(data, **kwargs)

Speak text directly using espeak.

open_file(path, **kwargs)

Reads a text file and speaks its content.

save_to_file(data, name, **kwargs)

Converts text to speech and saves it as an audio file.


🔢 Version

version = "1.0.0"


🧪 Example Full Program

import pyespeakr

pyespeakr.say("Testing the module")

pyespeakr.save_to_file( "Hello, this is a test file", "test.wav", speed=160 )


⚠️ Notes

Requires espeak installed on system

Works best on Linux / Termux environments

Windows may require additional setup

Download files

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

Source Distribution

pyespeakr-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

pyespeakr-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyespeakr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 dd1ea1d55e27576186074bb6791119a0d8e0872d3e9ee447f17834d4b9b4bbd0
MD5 2e62d6f6f994f79d74fa51fba0cbfc06
BLAKE2b-256 fdb98bca913890e4397c3305df1aaf3e080c510b30f82da727b2ae50968d3620

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyespeakr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 44ff60242d215ef26476640348ac4bf94fa4b71dd4af4c179d5e148aa5f09958
MD5 5aa36801570c0e81d0f78b51e2246943
BLAKE2b-256 8bd2e60fa67655370f4b06b49acdd95de8cc1e5e5d3cb299fa01a94154827922

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.3.4

2 files

0.2.0

2 files

Supported by

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