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

Uploaded Source

File details

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

File metadata

  • Download URL: text_to_speech-1.3.2.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.2.tar.gz
Algorithm Hash digest
SHA256 1fb060231f07be3ff6e1e358ba5e24f9e72cb97ec457ce119628e8bb5cad3631
MD5 0ead259812ce71199b63f47b07764050
BLAKE2b-256 3c25e94871f4a42dd6d6ef5048bd36dc53caa14967a5d07d14088e5227abcf90

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 Sentry Error logging StatusPage Status page