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.2.tar.gz (6.9 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.2-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tts-stt-tools-1.0.2.tar.gz
  • Upload date:
  • Size: 6.9 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.2.tar.gz
Algorithm Hash digest
SHA256 c53433809ae1b38e81b94bc5ae7e1c879694bf896fe3136d95790994bdbd0bad
MD5 7391c7ecc336f7eebb8df9ebbf83da65
BLAKE2b-256 7a14155fe995018a53becbcab10aaa53c98debd7a05725d89a94fc4f01cf6a52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tts_stt_tools-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4293060feb7a47eb5fda3bff40f6f3b93e4047bead57fa2a501cf2e3579e226f
MD5 37b6aadeecb3a0b4c5f0f3954e48932b
BLAKE2b-256 e75103b5620bb06fe0b4979709deddd8f31b6f32fbbfc19b79387fd73e299413

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