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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tts-stt-tools-1.0.5.tar.gz
  • Upload date:
  • Size: 7.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.5.tar.gz
Algorithm Hash digest
SHA256 fb30057efbbd232fb9fcdf6c61a085dcc82072de7ec01905fd731f33e697442d
MD5 1f2fd6ad63e6dbe2e9f79b8a2e0b78b4
BLAKE2b-256 71a964734ee89446c743d431720cd3db0de329a02821fc3b7fd750a1f5436772

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tts_stt_tools-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.9 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3133c957f392a2789872af12df7e474bbfcac5c100f8ef6bd560d2ee5983c37c
MD5 fe78e56bdbfc550966191ea483c7efb7
BLAKE2b-256 1a381a257e6bf11d9ede2952e784b095a6abec09038b83fcc9eabc4438ea409a

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