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.1.tar.gz (8.4 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: retico-googleasr-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 68efecc1d77d1abaf3c4c93d1c4e5633234e5c1132103e41c446e86ff4c96dd0
MD5 078d84abaf78d89ed06393243d2362f8
BLAKE2b-256 fe7217a81a5018b7c06fec485720938ef5785ad771e349e29af5bb34ac0448d5

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