alekssamos / msspeech Goto Github PK
View Code? Open in Web Editor NEWnot official API for Microsoft speech synthesis from Microsoft Edge web browser read aloud
Home Page: https://pypi.org/project/msspeech/
not official API for Microsoft speech synthesis from Microsoft Edge web browser read aloud
Home Page: https://pypi.org/project/msspeech/
There is a text file containing several sentences. When specifying this file through the CLI, multiple audio files will be outputted, with each sentence separated by a newline character, and each line representing one audio.
In new Windows 11 builds, Narrator can use the exact same voices that are available in Edge, but offline, and seemingly more customizable. These voices install as store apps, so we don't need an internet connection either, like you seem to in order to use the Edge voices. Is it possible to get these integrated into this project?
@alekssamos Thank you very much for this tool, I barely know it and it is perfect for some projects I am working on.
Problem:
When trying to save the audio file in a data buffer, the following error is displayed
msspeech/__init__.py, line 520, in _synthesize
bc += await f.write(resp[1])
TypeError: object int can't be used in 'await' expression
My code
file = BytesIO()
await mss.synthesize(data.text.strip(), file)
file.seek(0)
Solution:
remove the await and it worked for me.
I already tried to save the file as .mp3, .wav, .ogg, doesn't matter, kivy isn't able to load properly.
b'Unrecognized audio format'
from kivy.app import App
from kivy.core.audio import SoundLoader
class MusicPlayerApp(App):
def build(self):
# load the mp3 file using SoundLoader
sound = SoundLoader.load(R"D:\Documents\aaaa.ogg")
# play the audio file
sound.play()
return
if name == 'main':
MusicPlayerApp().run()
https://learn.microsoft.com/en-us/azure/cognitive-services/Speech-Service/language-support?tabs=tts
for voice in voices: if voice["Locale"] == "zh-CN": print("Chinese voices found: ", voice["ShortName"]) await mss.set_voice(voice["Name"])
I can't use:
such as
zh-CN-henan
zh-CN-liaoning
.........
Hello I find the voices_list_plus.json is outdated, as I can't find this voice for example:
zh-CN-YunjianNeural
:)
How can I update it myself?
And where can I add custom SSML?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.