Skip to main content

Master Text Converter

Project description

Features

  • Support text to speech with many pretty voices options
  • Support download file mp3 from TTS
  • Support convert text to IPA (International Phonetic Alphabet) with English UK and English US

Installation

Windows

python -m pip install mateco

Linux

pip install mateco

macOS

sudo pip3 install mateco

How does it work?

Working with module TTS

Setup Language for Converting

To setup language and voice using the method setup_voice(language_code), where language_code :

  • English US : am
  • English UK : br
  • Portuguese (Brazil): pt-br
  • Portuguese (Portugal): pt
  • The other languages : ISO LANGUAGE CODE 639-1
from mateco import TTS

# Initialization for Module TTS
mod = TTS()

# Choice the voice for America English
mod.setup_voice('am')

# Convert to audio data
mod.convert('Welcome to Master Text Converter library. I hope it\'s useful for you.')
mod.speak()
mod.save_to_file('audio.mp3')

# Change the language
mod.setup_voice('fr')
mod.convert('Je parle un peu français')
mod.speak()
mod.save_to_file('audio_french.mp3')
mod.close()

Output

>> All voices for your language:
>>    1. Joey - Male - SAPI5
>>    2. Justin - Male - SAPI5
>>    3. Matthew - Male - SAPI5
>>    4. Salli - Female - SAPI5
>>    5. Joanna - Female - SAPI5
>>    6. Ivy - Female - SAPI5
>> Make your choice: 3

Work with module IPA

Initialize module IPA

from mateco import IPA

# Setup English UK IPA
mod = IPA('am')
en_uk = mod.get_ipa('potato, tomato')
print('Bristh say:',en_uk)

# Setup English US IPA
mod = IPA('br')
en_us = mod.get_ipa('potato, tomato')
print('America say:',en_us)

# Working with Bulk - List of the texts
bulk = ['potato', 'tomato', 'schedule']
results = mod.get_ipas(bulk)
print(results)

Output

>> Bristh say: pəˈteɪˌtoʊ, təˈmeɪˌtoʊ
>> America say: pəˈteɪtəʊ, təˈmɑːtəʊ
>> ['pəˈteɪtəʊ', 'təˈmɑːtəʊ', 'ˈʃɛdjuːl']

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

mateco-1.4.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

mateco-1.4.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file mateco-1.4.1.tar.gz.

File metadata

  • Download URL: mateco-1.4.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.8 Windows/10

File hashes

Hashes for mateco-1.4.1.tar.gz
Algorithm Hash digest
SHA256 a7eef5782b789fba0df29328f53108f858c1aef38da89b445a8052a834c55dc2
MD5 5f90222a1a226fb238f9b35255ebad5a
BLAKE2b-256 687be36801c5587b6b59d45fa3fdf849c5461791b857a29dbb367ba0abd46bbc

See more details on using hashes here.

File details

Details for the file mateco-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: mateco-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.8 Windows/10

File hashes

Hashes for mateco-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03fa2a15e8be79e04e43587c8f86503bba3b3613e02210f396f1573724ae2486
MD5 30588f0dd943c263ab2038ffb9283542
BLAKE2b-256 26c01f0e0f0e7ee3a84e2be7cabcbe1421e8646bef12c6cfef6eecc51f2df2a7

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