🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

retico-googletts

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

retico-googletts

The GoogleASR incremental module for the retico framework

0.1.3
Maintainers
0

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)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts