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.1.5.post3.tar.gz
(10.3 kB
view details)
Built Distribution
File details
Details for the file voicesynth-0.1.5.post3.tar.gz
.
File metadata
- Download URL: voicesynth-0.1.5.post3.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1db30c95b61b59316ac601a44c0f3114cec4e21bb1c701ce3d8c704358c98a1 |
|
MD5 | bfc1fb822dc125e7bbed139e6e02d85a |
|
BLAKE2b-256 | ac04dab260e210767f632ec3a76fa3f4993dd7e5bb09e126f0291e4a5022b260 |
File details
Details for the file voicesynth-0.1.5.post3-py3-none-any.whl
.
File metadata
- Download URL: voicesynth-0.1.5.post3-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.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b62e7caed1874c14880167809cec2db751f5112c9526d1e28f98ee9db3287e44 |
|
MD5 | b481c3497bdfff8b8ff4c2eb18913820 |
|
BLAKE2b-256 | f28545d90dcb453d0539bf8a7b27bcc1d4dde064697b00ba40f03ec0e5bdce77 |