Giter Site home page Giter Site logo

espeakng-python's Introduction

eSpeak NG TTS Bindings for Python3

Copyright 2016-2020 Sayak B. Licenced under GNU GPLv3.

Python Version Linux Windows FOSSA Status

Requirements

You need to have eSpeak NG installed in your system and added to the path.

Windows

The latest installers for eSpeak NG can be found here.

The installed executable may need to be added to the system path. (See here)

Ubuntu & Debian

sudo apt-get update
sudo apt-get install espeak-ng

Others

If eSpeak NG is not available in your package manager, you may need to compile the binaries for your system. Refer to this page for more information.

Installation

PyPi

This library is available on PyPi.

pip install espeakng

GitHub Releases

You can download the latest release for this library here.

Usage

First, we have to initialize a Speaker.

import espeakng

mySpeaker = espeakng.Speaker()

And then use the Speaker.say() method to speak:

mySpeaker.say('Hello, World!')

Calling Speaker.say() will interrupt any ongoing output from the same object immediately.

Use the following code if you wish to wait for any ongoing speech to complete:

mySpeaker.say('I am a demo of the say() method.', wait4prev=True)

Changing speech properties

Pitch

By default the pitch is set at 80.

Change it by:

mySpeaker.pitch = 120

Words per Minute (WPM)

By default WPM is set at 120.

Change it by:

mySpeaker.wpm = 140

Voice

By default the voice is set to 'en'. The complete list of supported voices can be found here.

Change it by:

mySpeaker.voice = 'es'

Export to wav file

By default, your text will just be spoken alloud, but if you want it to be written to a wav file, you can specify an export_path when calling the say function

mySpeaker.say("Export this to a file", export_path="test.wav")

espeakng-python's People

Contributors

sayak-brm avatar restyled-commits avatar florianeagox avatar mickeydelp avatar fossabot avatar restyled-io[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.