Skip to main content

The GoogleASR incremental module for the retico framework

Project description

retico-googleasr

This project contains the incremental module for running Google Cloud ASR in a retico environment. Google ASR provides continuous speech recognition updates by updating the current prediction. As this is not in the correct format for incremental processing, the recognized speech gets incrementalized and only updates to the previous states are published. E.g.,

[UpdateType]        [text]             [stability]            [final]
UpdateType.ADD:     this               (0.8999999761581421) - False
UpdateType.ADD:     isn't a sentence   (0.8999999761581421) - False
UpdateType.REVOKE:  isn't a sentence   (0.8999999761581421) - False
UpdateType.ADD:     is a test sentence (0.0)                - True

Installing

To use the Automatic Speech Recognition module utilizing google cloud speech, you need to install the third-party package first.

For this, you may follow the first two steps of this tutorial.

Important is, that you create your Google Application Credentials json file and save the path to that file into the global variable GOOGLE_APPLICATION_CREDENTIALS (look for the "Before you begin" section on the tutorial page).

After that you can install the package with

$ pip install retico-googleasr

Documentation

Sadly, there is no proper documentation for retico-googleasr right now, but you can start using the GoogleASRModule like this:

from retico_core import *
from retico_googleasr import *


def callback(update_msg):
    for x, ut in update_msg:
        print(f"{ut}: {x.text} ({x.stability}) - {x.final}")


m1 = audio.MicrophoneModule(5000)
m2 = GoogleASRModule("en-US")  # en-US or de-DE or ....
m3 = debug.CallbackModule(callback=callback)

m1.subscribe(m2)
m2.subscribe(m3)

m1.run()
m2.run()
m3.run()

input()

m1.stop()
m2.stop()
m3.stop()

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

retico-googleasr-0.1.3.tar.gz (8.4 kB view details)

Uploaded Source

File details

Details for the file retico-googleasr-0.1.3.tar.gz.

File metadata

  • Download URL: retico-googleasr-0.1.3.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for retico-googleasr-0.1.3.tar.gz
Algorithm Hash digest
SHA256 97cdb38b8dce5f98af78eee4ca141ab73604760176c658d5679369b7ca1aa4bf
MD5 fa8c7849518d9920476510ede818ab7a
BLAKE2b-256 5c82be901f4de68a9cfde78c9770d2cb3a0f6842715bc204fda1eebe18b64efd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page