Skip to main content

A simple text to speech engine

Project description

text-to-speech

npm

A simple text to speech engine

Installation

To install the package run this command:

pip install text-to-speech

Usage

Speak

Write ‘hello’ in English

from text_to_speech import speak 

speak("hello")

Write ‘bonjour’ in French

from text_to_speech import speak 

speak("bonjour", lang="fr")

Write ‘hello’ in English slow

from text_to_speech import speak 

speak("hello", lang="en", slow=True)

Write ‘hello’ in English and save the file as "speech.mp3"

from text_to_speech import speak 

speak("hello", lang="en", save=True)

Write ‘hello’ in English and save the file as "hello.mp3"

from text_to_speech import speak 

speak("hello", lang="en", save=True, file="hello.mp3")

"text" is the text, and "lang" is an IETF language tag such as en or pt-br, "slow" is the option if it has to be read slow or not, "save" is if it has to be saved or not by default it is saved as "speech.mp3", "file" is if "save" = True you could choose a specific path or filename.

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

text_to_speech-1.3.3.tar.gz (2.4 kB view details)

Uploaded Source

File details

Details for the file text_to_speech-1.3.3.tar.gz.

File metadata

  • Download URL: text_to_speech-1.3.3.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

File hashes

Hashes for text_to_speech-1.3.3.tar.gz
Algorithm Hash digest
SHA256 93a42b4a9d528d93451ad5f88ab0f4f4ecfdb153d88ed21bff8ac07acdde2772
MD5 6c84a77d42a2a7bb628d91245a0d4566
BLAKE2b-256 2d9b718b762a008085654ca1cd813609db264610c1de02657b34edac044fdb05

See more details on using hashes here.

Supported by

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