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.3.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.3-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tts-stt-tools-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 bc776d62545e43903b817bd713325a8420946f5cff0fc9d016fceae47fc5d00b
MD5 0eb56890a99dc7a438e01ffae11e8e35
BLAKE2b-256 49a715e5c0506bef9bc87360e9908a3d3a446e62f5de152df261a4fc20340d47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tts_stt_tools-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e43cbf86e2f305a6e0e192fe6daef70f52102122dab5d0e6d653a9e832c2d764
MD5 3e9a73987a4210360603a717a6d30555
BLAKE2b-256 60280a6652336101e946914d26bbb38f4181ce5d86a13aadb6012c33e8cc7462

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