The GoogleASR incremental module for the retico framework
Project description
retico-googletts
This project contains the incremental module for running Google Cloud TTS in a retico environment. Google TTS provides multiple languages and voices, which can be looked up here.
The current implementation of the TTS module is not strictly incremental, as a new input triggers a complete resynthesizing of the speech.
How to install
Although the installation of retico-googletts only requires retico-core, there are a few software dependencies that have to be installed manually
GCloud
For the authentication with the Google TTS API, the command line argument gcloud
has
to be availbale. For information visit the Google Cloud Documentation. To validate that
the access work, the following command has to return the access token to authenticate
the use of the API:
$ gcloud auth print-access-token
ffmpeg
In order to convert the received audio files into the proper format, retico-googletts requires ffmpeg.
Documentation
Sadly, there is no proper documentation for retico-googletts right now, but you can start using the GoogleTTSModule like this:
from retico_core import *
from retico_googleasr import *
from retico_googletts import *
def callback(update_msg):
for x, ut in update_msg:
print(f"{ut}: {x.text} ({x.stability}) - {x.final}")
m1 = audio.MicrophoneModule()
m2 = GoogleASRModule()
m3 = text.TextDispatcherModule()
m4 = GoogleTTSModule("en-US", "en-US-Wavenet-A")
m5 = audio.AudioDispatcherModule(target_frame_length=0.2)
m6 = audio.StreamingSpeakerModule(frame_length=0.2)
m7 = debug.CallbackModule(callback)
m1.subscribe(m2)
m2.subscribe(m3)
m3.subscribe(m4)
m4.subscribe(m5)
m2.subscribe(m7)
m5.subscribe(m6)
network.run(m1)
print("Running")
input()
network.stop(m1)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file retico-googletts-0.1.3.tar.gz
.
File metadata
- Download URL: retico-googletts-0.1.3.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 589b3af1b0a10b023dca0462dd3451653c34a1476abb67231adb14550ca0881e |
|
MD5 | cc5c582eb92dbd5486eac4b7ffa5bcf7 |
|
BLAKE2b-256 | c368b9cce629cda3539ed777e376f4352cd8e877694755376a8927cadfac5693 |