🐸STT integration examples

Overview

🐸 STT 0.9.x Examples

These are various examples on how to use or integrate 🐸 STT using our packages.

It is a good way to just try out 🐸 STT before learning how it works in detail, as well as a source of inspiration for ways you can integrate it into your application or solve common tasks like voice activity detection (VAD) or microphone streaming.

Contributions are welcome!

Note: These examples target 🐸 STT 0.9.x only. If you're using a different release, you need to go to the corresponding branch for the release:

List of examples

Python:

JavaScript:

Windows/C#:

Java/Android:

Nim:

Help + Community

  1. Github Discussions - find and join open-ended community discussions related to 🐸 STT-examples
  2. Matrix Chat - the 🐸 Matrix channel where you can chat with folks about 🐸 STT-examples, get help, share ideas :)
  3. Github Issues - If you ran into a specific error/problem, feel free to open an issue in the repo.
Comments
  • Confirming licensing intent from contributors

    Confirming licensing intent from contributors

    Unfortunately we forgot to add a license file to this repo when we moved the examples to a separate repository. The main repo had the Mozilla Public License 2.0 and our intention was always to keep it as is. I'm tagging contributors to this repo to confirm that you agree to license your contributions as MPL-2.0. If you agree, please reply with a comment here saying "I agree to license my contributions to this repository under the Mozilla Public License 2.0."

    • [x] @carlfm01
    • [x] @Connoropolous
    • [x] @dsteinman
    • [x] @eagledot
    • [x] @eoinoreilly30
    • [x] @erksch
    • [x] @hadran9
    • [x] @Ideefixze
    • [x] @jmikedupont2
    • [x] @jschueller
    • [x] @lissyx
    • [x] @mschroederi
    • [x] @nmstoker
    • [x] @profwillie
    • [x] @siddiqaa
    opened by reuben 17
  • django_streaming_api

    django_streaming_api

    i am getting the segmentation fault(core dumped) error when doing the live transcription through Websockets after approx 1 sec or less than this. I only got one word of transcription after that error comes ... sometimes I got the malloc error.......I don't know how to fix this....

    opened by botankit 5
  • examples outdated

    examples outdated

    https://github.com/coqui-ai/STT-examples/tree/r0.9/vad_transcriber

    e.g. contains link to https://github.com/coqui-ai/STT-examples/blob/doc/audioTranscript.png 404

    and mozilla references

    opened by davidak 4
  • STT package NOT in npm,someone pls upload or help.

    STT package NOT in npm,someone pls upload or help.

    error log>npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/STT - Not found npm ERR! 404 npm ERR! 404 'STT@^1.3.0' is not in this registry. npm ERR! 404 This package name is not valid, because npm ERR! 404 1. name can no longer contain capital letters npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

    opened by RESDXChgfore9hing 2
  • fix package name in ffmpeg_vad_streaming example

    fix package name in ffmpeg_vad_streaming example

    npm ERR! code E404
    npm ERR! 404 Not Found - GET https://registry.npmjs.org/STT - Not found
    npm ERR! 404
    npm ERR! 404  'STT@^1.0.0' is not in this registry.
    npm ERR! 404 This package name is not valid, because
    npm ERR! 404  1. name can no longer contain capital letters
    
    opened by nornagon 2
  • Example using wasm on nodejs

    Example using wasm on nodejs

    Hi,

    was curious if it was possible to use the WASM file on nodejs for unsupported nodejs versions. I know I can load a wasm file but I was hoping there might be an example since I am not sure the javascript in a browser is 1:1 with that of nodejs (like FileReader) or audioinput.

    Thanks for any advice.

    opened by msj121 1
  • Add a demo of STT running in a WebWorker

    Add a demo of STT running in a WebWorker

    Pull request guidelines

    Welcome to the 🐸STT-examples project! We are excited to see your interest, and we appreciate your support!

    This repository is governed by the Contributor Covenant Code of Conduct. For more details, see the CODE_OF_CONDUCT.md file.

    Before accepting your pull request, you will be asked to sign a Contributor License Agreement.

    This Contributor License Agreement:

    • Protects you, Coqui, and the users of the code.
    • Does not change your rights to use your contributions for any purpose.
    • Does not change the license of the 🐸STT-examples project. It just makes the terms of your contribution clearer and lets us know you are OK to contribute.
    opened by Dexterp37 1
  • Add a simple WASM example

    Add a simple WASM example

    This is a simple demo for the WASM version of STT, which does not require a bundler and fetches the WASM libstt directly from the latest Github release.

    NPM is used to reduce the boilerplate by reusing an HTTP server and a file downloader\unzipper.

    Note: npm download currently fails as the "1.4.0" is marked as pre-release.

    Pull request guidelines

    Welcome to the 🐸STT-examples project! We are excited to see your interest, and we appreciate your support!

    This repository is governed by the Contributor Covenant Code of Conduct. For more details, see the CODE_OF_CONDUCT.md file.

    Before accepting your pull request, you will be asked to sign a Contributor License Agreement.

    This Contributor License Agreement:

    • Protects you, Coqui, and the users of the code.
    • Does not change your rights to use your contributions for any purpose.
    • Does not change the license of the 🐸STT-examples project. It just makes the terms of your contribution clearer and lets us know you are OK to contribute.
    opened by Dexterp37 1
  • Update package.json

    Update package.json

    Correct package name and newer version

    Pull request guidelines

    Welcome to the 🐸STT-examples project! We are excited to see your interest, and we appreciate your support!

    This repository is governed by the Contributor Covenant Code of Conduct. For more details, see the CODE_OF_CONDUCT.md file.

    Before accepting your pull request, you will be asked to sign a Contributor License Agreement.

    This Contributor License Agreement:

    • Protects you, Coqui, and the users of the code.
    • Does not change your rights to use your contributions for any purpose.
    • Does not change the license of the 🐸STT-examples project. It just makes the terms of your contribution clearer and lets us know you are OK to contribute.
    opened by comodoro 1
  • [Snyk] Security upgrade numpy from 1.17.3 to 1.22.0

    [Snyk] Security upgrade numpy from 1.17.3 to 1.22.0

    Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • batch_processing/requirements.txt
    ⚠️ Warning
    Keras-Preprocessing 1.1.2 requires numpy, which is not installed.
    Keras-Applications 1.0.8 requires numpy, which is not installed.
    h5py 2.10.0 requires numpy, which is not installed.
    bokeh 1.4.0 requires numpy, which is not installed.
    
    

    Vulnerabilities that will be fixed

    By pinning:

    Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- low severity | 471/1000
    Why? Recently disclosed, Has a fix available, CVSS 3.7 | Buffer Overflow
    SNYK-PYTHON-NUMPY-2321966 | numpy:
    1.17.3 -> 1.22.0
    | No | No Known Exploit

    (*) Note that the real score may have changed since the PR was raised.

    Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the effected dependencies could be upgraded.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic

    opened by snyk-bot 1
  • [Snyk] Security upgrade numpy from 1.17.3 to 1.22.0rc1

    [Snyk] Security upgrade numpy from 1.17.3 to 1.22.0rc1

    Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.

    Changes included in this PR

    • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
      • batch_processing/requirements.txt
    ⚠️ Warning
    Keras-Preprocessing 1.1.2 requires numpy, which is not installed.
    Keras-Applications 1.0.8 requires numpy, which is not installed.
    h5py 2.10.0 requires numpy, which is not installed.
    bokeh 1.4.0 requires numpy, which is not installed.
    
    

    Vulnerabilities that will be fixed

    By pinning:

    Severity | Priority Score (*) | Issue | Upgrade | Breaking Change | Exploit Maturity :-------------------------:|-------------------------|:-------------------------|:-------------------------|:-------------------------|:------------------------- low severity | 578/1000
    Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 3.7 | Buffer Overflow
    SNYK-PYTHON-NUMPY-2321969 | numpy:
    1.17.3 -> 1.22.0rc1
    | No | Proof of Concept low severity | 578/1000
    Why? Proof of Concept exploit, Recently disclosed, Has a fix available, CVSS 3.7 | Denial of Service (DoS)
    SNYK-PYTHON-NUMPY-2321970 | numpy:
    1.17.3 -> 1.22.0rc1
    | No | Proof of Concept

    (*) Note that the real score may have changed since the PR was raised.

    Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the effected dependencies could be upgraded.

    Check the changes in this PR to ensure they won't cause issues with your project.


    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

    For more information: 🧐 View latest project report

    🛠 Adjust project settings

    📚 Read more about Snyk's upgrade and patch logic

    opened by snyk-bot 1
  • mic_vad_streaming.py freezes when trying to record 4 channels and convert to 1 channel.

    mic_vad_streaming.py freezes when trying to record 4 channels and convert to 1 channel.

    def four_to_one(self, frame): #[ch1,ch2,ch3,ch4||ch1,ch2,ch3,ch4||ch1,ch2,ch3,ch4||ch1,ch2,ch3,ch4] frame = np.frombuffer(frame, np.int16) data = frame.reshape((self.CHANNELS,-1), order='F') b = 1/self.CHANNELS x = np.int16(0) for c in data: x+=c*b frame = (x.astype(np.int16)).tobytes() return frame The above code is part of converting 4 channels frame to 1 channel. mic_vad_streaming.py file freezes when running on Raspberry and trying to record 4 channels. The function mentioned above is called inside the vad_collector function when length of the frame is larger than 2560.

    opened by Varuzhan97 0
  • .Net Framework example missing solution?

    .Net Framework example missing solution?

    This is essentially a copy of https://github.com/mozilla/DeepSpeech-examples/issues/187

    Where the problem seems the same. Is there any support on this..?

    opened by yafimski 0
  • Add a checklist for new examples

    Add a checklist for new examples

    Some example projects are not listed under the appropriate section of the main README.

    Notably for Android examples, the main readme points to a depreciated example while we have a working example not listed.

    Adding the missing ones manually can solve the issue temporarily but a more permanent solution would be to make checklist in the template for PR or something.

    opened by wasertech 0
  • Update examples to use STT 1.3.0

    Update examples to use STT 1.3.0

    For example:

    pi@raspberrypi:~/Source/STT-examples $ git diff
    diff --git a/mic_vad_streaming/requirements.txt b/mic_vad_streaming/requirements.txt
    index e97d363..3eb12cc 100644
    --- a/mic_vad_streaming/requirements.txt
    +++ b/mic_vad_streaming/requirements.txt
    @@ -1,7 +1,7 @@
    -stt~=1.0.0
    +stt~=1.3.0
     pyaudio~=0.2.11
     webrtcvad~=2.0.10
     halo~=0.0.18
     numpy>=1.15.1
     scipy>=1.1.0
    -pyautogui~=0.9.52
    \ No newline at end of file
    +pyautogui~=0.9.52
    
    opened by ftyers 1
  • Feature request: make web_microphone_websocket work outside localhost

    Feature request: make web_microphone_websocket work outside localhost

    The web_microphone_websocket example works for localhost, but on a domain there were CORS errors from the socket.io code, e.g. Chrome:

    Access to XMLHttpRequest at 'https://example.com:4000/socket.io/?EIO=3&transport=polling&t=Nu-iT4E' from origin 'https://example.com.cz:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    

    Several recipes from SO and the socket.io docs did not work, perhaps someone with better JS knowledge might help.

    opened by comodoro 3
Owner
coqui
Coqui, a startup providing open speech tech for everyone 🐸
coqui
Unadversarial Examples: Designing Objects for Robust Vision

Unadversarial Examples: Designing Objects for Robust Vision This repository contains the code necessary to replicate the major results of our paper: U

Microsoft 93 Nov 28, 2022
Source code, datasets and trained models for the paper Learning Advanced Mathematical Computations from Examples (ICLR 2021), by François Charton, Amaury Hayat (ENPC-Rutgers) and Guillaume Lample

Maths from examples - Learning advanced mathematical computations from examples This is the source code and data sets relevant to the paper Learning a

Facebook Research 171 Nov 23, 2022
Several simple examples for popular neural network toolkits calling custom CUDA operators.

Neural Network CUDA Example Several simple examples for neural network toolkits (PyTorch, TensorFlow, etc.) calling custom CUDA operators. We provide

WeiYang 798 Jan 1, 2023
Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.

PyTorch Implementation of Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers 1 Using Colab Please notic

Hila Chefer 489 Jan 7, 2023
A repo with study material, exercises, examples, etc for Devnet SPAUTO

MPLS in the SDN Era --> DevNet SPAUTO Get right to the study material: Checkout the Wiki! A lab topology based on MPLS in the SDN era book used for 30

Hugo Tinoco 67 Nov 16, 2022
transfer attack; adversarial examples; black-box attack; unrestricted Adversarial Attacks on ImageNet; CVPR2021 天池黑盒竞赛

transfer_adv CVPR-2021 AIC-VI: unrestricted Adversarial Attacks on ImageNet CVPR2021 安全AI挑战者计划第六期赛道2:ImageNet无限制对抗攻击 介绍 : 深度神经网络已经在各种视觉识别问题上取得了最先进的性能。

null 25 Dec 8, 2022
[ICLR2021] Unlearnable Examples: Making Personal Data Unexploitable

Unlearnable Examples Code for ICLR2021 Spotlight Paper "Unlearnable Examples: Making Personal Data Unexploitable " by Hanxun Huang, Xingjun Ma, Sarah

Hanxun Huang 98 Dec 7, 2022
This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong Poisons

Adversarial poison generation and evaluation. This framework implements the data poisoning method found in the paper Adversarial Examples Make Strong

null 31 Nov 1, 2022
TensorRT examples (Jetson, Python/C++)(object detection)

TensorRT examples (Jetson, Python/C++)(object detection)

Nobuo Tsukamoto 53 Dec 22, 2022
Pre-trained model, code, and materials from the paper "Impact of Adversarial Examples on Deep Learning Models for Biomedical Image Segmentation" (MICCAI 2019).

Adaptive Segmentation Mask Attack This repository contains the implementation of the Adaptive Segmentation Mask Attack (ASMA), a targeted adversarial

Utku Ozbulak 53 Jul 4, 2022
A certifiable defense against adversarial examples by training neural networks to be provably robust

DiffAI v3 DiffAI is a system for training neural networks to be provably robust and for proving that they are robust. The system was developed for the

SRI Lab, ETH Zurich 202 Dec 13, 2022
Principled Detection of Out-of-Distribution Examples in Neural Networks

ODIN: Out-of-Distribution Detector for Neural Networks This is a PyTorch implementation for detecting out-of-distribution examples in neural networks.

null 189 Nov 29, 2022
Hi Guys, here I am providing examples, which will help you in Lerarning Python

LearningPython Hi guys, here I am trying to include as many practice examples of Python Language, as i Myself learn, and hope these will help you in t

null 4 Feb 3, 2022
A set of examples around hub for creating and processing datasets

Examples for Hub - Dataset Format for AI A repository showcasing examples of using Hub Uploading Dataset Places365 Colab Tutorials Notebook Link Getti

Activeloop 11 Dec 14, 2022
The Self-Supervised Learner can be used to train a classifier with fewer labeled examples needed using self-supervised learning.

Published by SpaceML • About SpaceML • Quick Colab Example Self-Supervised Learner The Self-Supervised Learner can be used to train a classifier with

SpaceML 92 Nov 30, 2022
Some toy examples of score matching algorithms written in PyTorch

toy_gradlogp This repo implements some toy examples of the following score matching algorithms in PyTorch: ssm-vr: sliced score matching with variance

Ending Hsiao 21 Dec 26, 2022
Autonomous Ground Vehicle Navigation and Control Simulation Examples in Python

Autonomous Ground Vehicle Navigation and Control Simulation Examples in Python THIS PROJECT IS CURRENTLY A WORK IN PROGRESS AND THUS THIS REPOSITORY I

Joshua Marshall 14 Dec 31, 2022
Numba-accelerated Pythonic implementation of MPDATA with examples in Python, Julia and Matlab

PyMPDATA PyMPDATA is a high-performance Numba-accelerated Pythonic implementation of the MPDATA algorithm of Smolarkiewicz et al. used in geophysical

Atmospheric Cloud Simulation Group @ Jagiellonian University 15 Nov 23, 2022
Experiments and examples converting Transformers to ONNX

Experiments and examples converting Transformers to ONNX This repository containes experiments and examples on converting different Transformers to ON

Philipp Schmid 4 Dec 24, 2022