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:
-
Create and activate a virtual environment:
python3 -m venv testEnv1 source testEnv1/bin/activate
-
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:
-
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:
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tts-stt-tools-1.0.1.tar.gz.
File metadata
- Download URL: tts-stt-tools-1.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
061d1e1f52db178f83e0a0b655fb7641f2dd41c97f8d0ea620077281c9b919d9
|
|
| MD5 |
4d067cb165ecbcaf7ea52a81b6b2cfb0
|
|
| BLAKE2b-256 |
da679d0b78b4f67e400d5b7f069d7b2d84914afd3b9851ad994a26903d214954
|
File details
Details for the file tts_stt_tools-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tts_stt_tools-1.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
340d7a4573a8a549945fc91e0f41d24a34a872ab54d607213ccb0f2beba80ba4
|
|
| MD5 |
91e560415943ad4ae525f8ec9ae48cf2
|
|
| BLAKE2b-256 |
76a1128ad48115d3d013c0c8ae55ee58f5e439d5ede306c389011f850b5a524e
|