Skip to main content

retico-wav2vecasr

Local wav2vec ASR Module for ReTiCo

Installations and requirements

you can install the module via pip:

$ pip install retico-wav2vecasr

In order to access the ASR models, one of PyTorch, TensorFlow, or Flax need to be installed. For example, PyTorch can be installed via pip with:

$ pip install torch

Example

import retico_core
from retico_wav2vecasr import *
from retico_wav2vecasr.wav2vecasr import Wav2VecASRModule

msg = []


def callback(update_msg):
    global msg
    for x, ut in update_msg:
        if ut == retico_core.UpdateType.ADD:
            msg.append(x)
        if ut == retico_core.UpdateType.REVOKE:
            msg.remove(x)
    txt = ""
    committed = False
    for x in msg:
        txt += x.text + " "
        committed = committed or x.committed
    print(" " * 80, end="\r")
    print(f"{txt}", end="\r")
    if committed:
        msg = []
        print("")


microphone = retico_core.audio.MicrophoneModule()
asr = Wav2VecASRModule("en")


m3 = debug.CallbackModule(callback=callback)

microphone.subscribe(asr)
asr.subscribe(m3)

retico_core.network.run(asr)

print("Running the ASR. Press enter to exit")
input()

retico_core.network.stop(asr)

Metadata

Release files for retico-wav2vecasr 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for retico-wav2vecasr 0.1.6
File Size Uploaded
retico-wav2vecasr-0.1.6.tar.gz 8.4 kB Details

Release files / retico-wav2vecasr-0.1.6.tar.gz

Download URL retico-wav2vecasr-0.1.6.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
537814a4eebc8ed64d48e83c8c1cba5779c87bd306207284cfa1c2835c21c83a
BLAKE2b-256 checksum
How to use checksums
c505898aa65e7ea03590ebce88bde3880cfe06f3fbc31b3c495e9a8d408e0ba7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page