Package for realistic voice synthesis
Project description
VoiceSynth
Voice Synthesizing LibraryHow to use:
First, install the packagepip install voicesynth
Then import it into your code and go ahead and use it:
from voicesynth import Model, Synthesizer, show_available_models
show_available_models() # Showcase of all tts models available
# initializing the model
# setting show_download to False does not show model downloading progress
model = Model("v4_ru", model_path="model.pt", show_download=False)
model.set_speaker("eugene")
# creating a synthesizer instance
synthesizer = Synthesizer(model)
synthesizer.say("Я представить себе не могу, что это действительно случилось!")
Instead of using .say() method, you can synthesize an audio and then play it whenever you want
import time
synthesizer.synthesize("Всем привет!", path="audio.wav")
time.sleep(3)
synthesizer.play_playsound("audio.wav")
There are multiple ways to play a synthesized audio:
synthesizer.say("Как дела?", module="pygame") # Using pygame.mixer to play the audio
synthesizer.say("Хорошо, а твои как?", module="pydub") # Using pydub to play the audio
There are three ways to play the audio:
synthesizer.audio.play_playsound("audio.wav")
synthesizer.audio.play_pygame("audio.wav")
synthesizer.audio.play_pydub("audio.wav")
All models support simple ssml tags:
synthesizer.say("В н+едрах т+ундры в+ыдры п+ели п+есни", prosody_rate=90)
# I added prosody as a parameter, so that people who are not familiar with ssml tags
# could change speaking speed without knowing how to manually do it
By default, logging is enabled. If it bothers you, you can disable it
from voicesynth import disable_logging
disable_logging()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
voicesynth-0.2.0.tar.gz
(10.3 kB
view details)
Built Distribution
File details
Details for the file voicesynth-0.2.0.tar.gz
.
File metadata
- Download URL: voicesynth-0.2.0.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdb34826294d8b3e19d00ec70c8395977d24a04278535140964c9d260116912f |
|
MD5 | b428f45b918a8696217488e0d6a535d8 |
|
BLAKE2b-256 | 4fee58b4e8a86fee5050a32845d02a3e2bd497c1842916fa26d3bbb1476df423 |
File details
Details for the file voicesynth-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: voicesynth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b44597bc9ff3e4a725a8254186753dfcbb8299c6d9eb5f42a314acfa2a1939a |
|
MD5 | 2c628d35731a64b92e36f87a4cb34788 |
|
BLAKE2b-256 | 212f0a75e704b3655937f16f857c07183639eccb9eac9bd5b3601900b225a28d |