retoor a75a6574ba feat: add async play_audio_async generator with pygame mixer polling loop
Introduce an asynchronous generator function `play_audio_async` in `src/rspeech/play.py` that initializes the pygame mixer, loads and plays a given audio file, then yields control every 100ms while the music is still busy, enabling non-blocking audio playback in async contexts.
2025-01-18 14:38:02 +00:00

RSPEECH

Speech recognitzion and text-to-speech powered by google. You need gcloud sdk configured on your PC. Also you need a google project with a billing account. The google project requires a default service account and a service account key. You can also use a service account token.

TTS

from rspeech.tts import tts
await tts("hello world")

STT

from rspeech.stt import listen, listen_async
# Async:
text = await listen_async()
# Traditional:
text = listen()

Need help?

This project is made in a short period of time because it's just part of a bigger project and that affected quality a bit.

If you need help, contact me on retoor@molodetz.nl.

S
Description
Library for talking with your computer using google api's.
Readme
61 KiB
Languages
Python 99.2%
Makefile 0.8%