Skip to main content

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.

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.4.0.tar.gz (2.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for text_to_speech-1.4.0.tar.gz
Algorithm Hash digest
SHA256 dd0d4b83d214370f5a1ffe9c7fbcfc7661136cd14caf13ee6b8200b982d8ffbe
MD5 aa38a5fb0b96a6a3de7eee55a8c3ca85
BLAKE2b-256 8dc9bdab30fc83dc476b08482525a51f9dfe7e18c54a5f7ddf1966859538b75a

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