Giter Site home page Giter Site logo

alekssamos / msspeech Goto Github PK

View Code? Open in Web Editor NEW
55.0 3.0 10.0 429 KB

not official API for Microsoft speech synthesis from Microsoft Edge web browser read aloud

Home Page: https://pypi.org/project/msspeech/

Python 95.47% Makefile 4.53%
speech-synthesis speech-synthesis-api speech-synthesis-library tts-api

msspeech's People

Contributors

alekssamos avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

msspeech's Issues

Does the CLI support reading text from a file?

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.

Option to use the Narrator voices?

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?

(problem and solution) save the audio in data buffer

@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.

Doesn't work with SoundLoader (kivy)

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()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.