-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
current_version = "0.4.13" | ||
current_version = "0.4.14" | ||
|
||
import setuptools | ||
|
||
|
@@ -7,7 +7,7 @@ | |
long_description = fh.read() | ||
|
||
long_description = """ | ||
To install RealTimeTTS, you need to specify the TTS engine(s) you wish to use. | ||
To install realtimetts, you need to specify the TTS engine(s) you wish to use. | ||
For example, to install all supported engines: | ||
|
@@ -85,14 +85,14 @@ def parse_requirements(filename): | |
} | ||
|
||
setuptools.setup( | ||
name="RealTimeTTS", | ||
name="realtimetts", | ||
version=current_version, | ||
author="Kolja Beigel", | ||
author_email="[email protected]", | ||
description="Stream text into audio with an easy-to-use, highly configurable library delivering voice output with minimal latency.", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/KoljaB/RealTimeTTS", | ||
url="https://github.com/KoljaB/realtimetts", | ||
packages=setuptools.find_packages(), | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
if __name__ == "__main__": | ||
from RealtimeTTS import TextToAudioStream, EdgeEngine, EdgeVoice | ||
from RealtimeTTS import EdgeEngine, TextToAudioStream | ||
|
||
def dummy_generator(): | ||
yield "Hey guys! These here are realtime spoken sentences based on edge text synthesis. " | ||
yield "With a voice based on microsoft azure tts technology. " | ||
text = """\ | ||
No, the way it "cuts midway" is NOT like the audio is cut abruptly (like when you pause a video). You can check below the audio (sorry for not doing that earlier)\ | ||
""" | ||
|
||
#voice = GTTSVoice(s1peed=1.3) | ||
engine = EdgeEngine(rate=5, pitch=10) | ||
stream = TextToAudioStream(engine, output_device_index=0) | ||
voice_engine = EdgeEngine() | ||
#voice_engine.set_voice(2) | ||
voice_stream = TextToAudioStream(voice_engine, language="en") | ||
|
||
print("Getting voices") | ||
voices = engine.get_voices() | ||
print(voices) | ||
#engine.set_voice("RyanNeural") | ||
#voice_stream.feed(text).play_async(force_first_fragment_after_words=12) | ||
voice_stream.feed(text).play_async() | ||
|
||
import time | ||
time.sleep(30) | ||
|
||
|
||
|
||
# if __name__ == "__main__": | ||
# from RealtimeTTS import TextToAudioStream, EdgeEngine, EdgeVoice | ||
|
||
# def dummy_generator(): | ||
# yield "Hey guys! These here are realtime spoken sentences based on edge text synthesis. " | ||
# yield "With a voice based on microsoft azure tts technology. " | ||
|
||
# #voice = GTTSVoice(s1peed=1.3) | ||
# engine = EdgeEngine(rate=5, pitch=10) | ||
# stream = TextToAudioStream(engine, output_device_index=0) | ||
|
||
# print("Getting voices") | ||
# voices = engine.get_voices() | ||
# print(voices) | ||
# #engine.set_voice("RyanNeural") | ||
|
||
|
||
#voice = EdgeVoice("en-GB-RyanNeural", rate="+5%", volume="+0%", pitch="+10Hz") | ||
voice = EdgeVoice("en-GB-RyanNeural") | ||
engine.set_voice(voice) | ||
# #voice = EdgeVoice("en-GB-RyanNeural", rate="+5%", volume="+0%", pitch="+10Hz") | ||
# voice = EdgeVoice("en-GB-RyanNeural") | ||
# engine.set_voice(voice) | ||
|
||
print("Starting to play stream") | ||
stream.feed(dummy_generator()).play(log_synthesized_text=True) | ||
# print("Starting to play stream") | ||
# stream.feed(dummy_generator()).play(log_synthesized_text=True) |