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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tts-stt-tools-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e239c150d20566a95b13487fb92dac3cc827bc090e4cf17d13f927cb797d488d
MD5 68fae2ad8589d813ce8b68d0d3885a1d
BLAKE2b-256 b01e93b30e64567b584432e48827f3f11b1be55fb5db74d1a0329a18e01a4f6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tts_stt_tools-1.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a7c103b0873406b570473788bec3c5ba2a3f6bbfec266f6a1892ceccdd88ce
MD5 9ffecb232fb85b523929f623a4fae633
BLAKE2b-256 7b67d63b6cf113ab6fb9eceace7612cda66ea7efa5a3b5cd2eac51099898d8b9

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