Skip to main content

A package for text-to-speech and speech-to-text tools

Project description

TTS-STT Tools

tts-stt-tools is a Python package designed to simplify text-to-speech (TTS) and speech-to-text (STT) conversions. This package provides an easy way to convert text into speech using various TTS systems and manage audio files efficiently.

Features

  • Text-to-Speech (TTS): Convert text into speech with customizable voice models.
  • Speech-to-Text (STT): Convert speech into text using specified STT models.

Installation

To install tts-stt-tools, follow these steps:

  1. Create and activate a virtual environment:

    python3 -m venv testEnv1
    source testEnv1/bin/activate
    
  2. Install the package using pip:

    python3 -m pip install --upgrade tts-stt-tools
    

Usage

Text-to-Speech

Convert text to speech with the following example:

  1. Import the package and initialize the TTS system:

    from tts_stt_tools import process_text_to_speech
    
    text = """
    Part three
    
    November 10–Present
    
    CHAPTER 14
    • Monday, November 10
    On Monday morning, Maxine is startled...
    """
    
    process_text_to_speech(text, voice_model='en_US/hifi-tts_low', filename='output.wav')
    

Speech-to-Text

Convert speech to text using a specified model:

  1. Import the package and process the speech:

    from tts_stt_tools import process_speech_to_text
    
    mp3_path = "output.wav"
    output_directory = ""  # Specify the output directory if needed
    model_path = "vosk-model-small-en-us-0.15"  # Or use "vosk-model-en-us-0.42-gigaspeech"
    
    process_speech_to_text(mp3_path, output_directory, model_path)
    

Optionally cleanup resources if needed:

deactivate
rm -r testEnv
rm -r testEnv1
rm -r *.log
rm -r *.wav
rm -r venv
rm -r ./Library/Jupyter/kernels/testenv
rm -r vosk-model-*

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

tts-stt-tools-1.0.4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tts_stt_tools-1.0.4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file tts-stt-tools-1.0.4.tar.gz.

File metadata

  • Download URL: tts-stt-tools-1.0.4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for tts-stt-tools-1.0.4.tar.gz
Algorithm Hash digest
SHA256 cbf5a97a9b0b527f7510635bd158aac8d6d07d31c3b949c5399ed7fa3c73ff62
MD5 af528d54bb0201519e9f819083856956
BLAKE2b-256 48c9e30c78eb9229abd6c5d597b175e3613bdfd1905229e3ad12be6ece6a1570

See more details on using hashes here.

File details

Details for the file tts_stt_tools-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: tts_stt_tools-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for tts_stt_tools-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f5eaedbdaeb842db7f19033f94c00f27773db76859b8f7d5c9929568fb973d5d
MD5 e88e67160d8377ffcdc29b4b7a150ddd
BLAKE2b-256 f311f535c1b7584de430d1ca1ee3b14d84d5e8bac6c961824589224cbb358e13

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