All Projects → StephenVinouze → Kontinuousspeechrecognizer

StephenVinouze / Kontinuousspeechrecognizer

Licence: apache-2.0
A Kotlin Speech Recognizer that runs continuously and is triggered with an activation keyword

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Kontinuousspeechrecognizer

Factorized Tdnn
PyTorch implementation of the Factorized TDNN (TDNN-F) from "Semi-Orthogonal Low-Rank Matrix Factorization for Deep Neural Networks" and Kaldi
Stars: ✭ 98 (-13.27%)
Mutual labels:  speech-recognition
Delta
DELTA is a deep learning based natural language and speech processing platform.
Stars: ✭ 1,479 (+1208.85%)
Mutual labels:  speech-recognition
Python Speech recognition
A simple example for use speech recognition baidu api with python.
Stars: ✭ 106 (-6.19%)
Mutual labels:  speech-recognition
Vosk Api
Offline speech recognition API for Android, iOS, Raspberry Pi and servers with Python, Java, C# and Node
Stars: ✭ 1,357 (+1100.88%)
Mutual labels:  speech-recognition
Wav2letter.pytorch
A fully convolution-network for speech-to-text, built on pytorch.
Stars: ✭ 104 (-7.96%)
Mutual labels:  speech-recognition
Self Supervised Speech Recognition
speech to text with self-supervised learning based on wav2vec 2.0 framework
Stars: ✭ 106 (-6.19%)
Mutual labels:  speech-recognition
Ai Study
人工智能学习资料超全整理,包含机器学习基础ML、深度学习基础DL、计算机视觉CV、自然语言处理NLP、推荐系统、语音识别、图神经网路、算法工程师面试题
Stars: ✭ 93 (-17.7%)
Mutual labels:  speech-recognition
Kalliope
Kalliope is a framework that will help you to create your own personal assistant.
Stars: ✭ 1,509 (+1235.4%)
Mutual labels:  speech-recognition
Kaldi Gop
Computes the GMM-based Goodness of Pronunciation (GOP). Bases on Kaldi.
Stars: ✭ 104 (-7.96%)
Mutual labels:  speech-recognition
E2e Asr
PyTorch Implementations for End-to-End Automatic Speech Recognition
Stars: ✭ 106 (-6.19%)
Mutual labels:  speech-recognition
Openseq2seq
Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP
Stars: ✭ 1,378 (+1119.47%)
Mutual labels:  speech-recognition
Spokestack Python
Spokestack is a library that allows a user to easily incorporate a voice interface into any Python application.
Stars: ✭ 103 (-8.85%)
Mutual labels:  speech-recognition
Bigcidian
Pronunciation lexicon covering both English and Chinese languages for Automatic Speech Recognition.
Stars: ✭ 99 (-12.39%)
Mutual labels:  speech-recognition
Audiomate
Python library for handling audio datasets.
Stars: ✭ 99 (-12.39%)
Mutual labels:  speech-recognition
Deepspeechrecognition
A Chinese Deep Speech Recognition System 包括基于深度学习的声学模型和基于深度学习的语言模型
Stars: ✭ 1,421 (+1157.52%)
Mutual labels:  speech-recognition
Mongolian Speech Recognition
Mongolian speech recognition with PyTorch
Stars: ✭ 97 (-14.16%)
Mutual labels:  speech-recognition
Ios ml
List of Machine Learning, AI, NLP solutions for iOS. The most recent version of this article can be found on my blog.
Stars: ✭ 1,409 (+1146.9%)
Mutual labels:  speech-recognition
Ml Road
Machine Learning Resources, Practice and Research
Stars: ✭ 1,776 (+1471.68%)
Mutual labels:  speech-recognition
Transformers
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
Stars: ✭ 55,742 (+49229.2%)
Mutual labels:  speech-recognition
Pansori
Tools for ASR Corpus Generation from Online Video
Stars: ✭ 106 (-6.19%)
Mutual labels:  speech-recognition

KontinuousSpeechRecognizer

Release Build Status API Android Arsenal GitHub license

Prelude

Speech recognition is designed to listen commands for a brief moment and deactivate on its own. I wanted to mimic the "OK Google" recognition pattern. Use it with care to prevent battery drain.

The recognizer is managed on its own via the KontinuousRecognitionManager and exposes methods such as startRecognition, stopRecognition, cancelRecognition and destroyRecognizer. It is up to you to manage the lifecycle of this manager from your view.

The recognizer will be listening and be respawned all the time once you call startRecognition and until you call stopRecognition. It expects an activation keyword, such as "Ok Google", then once detected will yield the result to the client and stop listening. A sound system will be heard once the activation keyword is detected but you can decide to mute it.

The workflow is explained as follow :

Speech recognition

Getting started

In your AndroidManifest.xml file, add the following line if your manifest merger is disabled :

<uses-permission android:name="android.permission.RECORD_AUDIO" />

If you are developing an application targeting SDK 23, remember to take care of runtime permission.

In your Activity, create the KontinuousRecognitionManager :

companion object {
   /**
    * Put any keyword that will trigger the speech recognition
    */
   private const val ACTIVATION_KEYWORD = "<YOUR_ACTIVATION_KEYWORD>"
}

private val recognitionManager: KontinuousRecognitionManager by lazy {
       KontinuousRecognitionManager(this, activationKeyword = ACTIVATION_KEYWORD, shouldMute = false, callback = this)
   }

override fun onCreate(savedInstanceState: Bundle?) {
   super.onCreate(savedInstanceState)
   setContentView(R.layout.activity_main)

   recognitionManager.createRecognizer()
   
   if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) {
       ActivityCompat.requestPermissions(this, arrayOf(Manifest.permission.RECORD_AUDIO), RECORD_AUDIO_REQUEST_CODE)
   }
}

override fun onDestroy() {
   recognitionManager.destroyRecognizer()
   super.onDestroy()
}

override fun onResume() {
   super.onResume()

   if (ContextCompat.checkSelfPermission(this, Manifest.permission.RECORD_AUDIO) == PackageManager.PERMISSION_GRANTED) {
       startRecognition()
   }
}

override fun onPause() {
   stopRecognition()
   super.onPause()
}

We also provide an optional RecognitionCallback interface that yields all RecognitionListener callbacks in addition to a few custom ones corresponding to the keyword detection and the speech recognition availability (it is known to be unsupported on a range of devices).

Gradle Dependency

Add this in your root build.gradle file:

allprojects {
	repositories {
		// ... other repositories
		maven { url "https://jitpack.io" }
	}
}

Then add the following dependency in your project.

dependencies {
    implementation "com.github.StephenVinouze:KontinuousSpeechRecognizer:{latest_version}"
}

Pull requests

I welcome and encourage all pull requests. I might not be able to respond as fast as I would want to but I endeavor to be as responsive as possible.

All PR must:

  1. Be written in Kotlin
  2. Maintain code style
  3. Indicate whether it is a enhancement, bug fix or anything else
  4. Provide a clear description of what your PR brings
  5. Enjoy coding in Kotlin :)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].