Git Product home page Git Product logo

kontinuousspeechrecognizer's Introduction

Hi there, I'm Stephen ๐Ÿ‘‹

Giving life to mobile apps for 10+ years ๐Ÿ“ฑ. Kotlin advocate since day 1 ๐Ÿฅ‘. Technical writer โœ๏ธ. Also a knack for mobile devops โˆž. And world traveler when Iโ€™m not behind a laptop โœˆ๏ธ

Stephen Vinouze's Twitter Stephen Vinouze's Medium Stephen Vinouze's Linkedin




kontinuousspeechrecognizer's People

Contributors

stephenvinouze avatar svinouze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kontinuousspeechrecognizer's Issues

Create new activty from KontinuousRecognitionManager on specified key word

Hello, I try to learn Kotlin and so i m focusing on your code, here is what I ve done:
-In the function "onResults" of KontinuousRecognitionManager.kt I identify some keyword to detect so that is working
-PROBLEM: I want to go to the Activity that I've already created for each keyword when one of them is said...I don t know how to do it, maybe could you help if you find it interesting ?

I tried to create a function "next" in KontinuousRecognitionManager.kt that is called after spelling a keyword and that are managed by "if" conditions. But there is a problem with the "Intent" method and the "context" of the class it seems...

build.gradle error

Hello, I don't know why there's an error in this part

I write this code: implementation 'com.github.StephenVinouze:KontinuousSpeechRecognizer:3.3.9'

and I got this error:
Failed to resolve: com.github.StephenVinouze:KontinuoussSpeechRecognizer:3.3.9
Show in Project Structure dialog
Show Details
Affected Modules: app

java.lang.IllegalArgumentException: Bad direction -100

when i try to run app i got this error at this function

Tested on v5.1.1 on

private fun muteRecognition(mute: Boolean) {
        val  flag = if (mute) AudioManager.ADJUST_MUTE else AudioManager.ADJUST_UNMUTE
        audioManager.adjustStreamVolume(AudioManager.STREAM_MUSIC, flag, 0)
        audioManager.adjustStreamVolume(AudioManager.STREAM_SYSTEM, flag, 0)
    }
at android.os.Parcel.readException(Parcel.java:1550)
                                                                                                         at android.os.Parcel.readException(Parcel.java:1499)
                                                                                                         at android.media.IAudioService$Stub$Proxy.adjustStreamVolume(IAudioService.java:1026)
                                                                                                         at android.media.AudioManager.adjustStreamVolume(AudioManager.java:1141)
                                                                                                         at com.github.stephenvinouze.core.managers.KontinuousRecognitionManager.muteRecognition(KontinuousRecognitionManager.kt:69)
                                                                                                         at com.github.stephenvinouze.core.managers.KontinuousRecognitionManager.onReadyForSpeech(KontinuousRecognitionManager.kt:78)
                                                                                                         at android.speech.SpeechRecognizer$InternalListener$1.handleMessage(SpeechRecognizer.java:453)
                                                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                                         at android.os.Looper.loop(Looper.java:135)
                                                                                                         at android.app.ActivityThread.main(ActivityThread.java:5912)
                                                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                                                         at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
                                                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)](url)

crash when recognizing the keyword

Good morning.
I was testing your project but when it recognizes the keyword it immediately causes the app to crash and the error code it throws at me is

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.recognitionspeech, PID: 5485 java.lang.SecurityException: Not allowed to change Do Not Disturb state at android.os.Parcel.createException(Parcel.java:2088) at android.os.Parcel.readException(Parcel.java:2056) at android.os.Parcel.readException(Parcel.java:2004) at android.media.IAudioService$Stub$Proxy.adjustStreamVolume(IAudioService.java:2892) at android.media.AudioManager.adjustStreamVolume(AudioManager.java:928) at com.github.stephenvinouze.core.managers.KontinuousRecognitionManager.muteRecognition(KontinuousRecognitionManager.kt:74) at com.github.stephenvinouze.core.managers.KontinuousRecognitionManager.onReadyForSpeech(KontinuousRecognitionManager.kt:91) at android.speech.SpeechRecognizer$InternalListener$1.handleMessage(SpeechRecognizer.java:453) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:237) at android.app.ActivityThread.main(ActivityThread.java:7811) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076) Caused by: android.os.RemoteException: Remote stack trace: at com.android.server.audio.AudioService.checkForRingerModeChange(AudioService.java:4698) at com.android.server.audio.AudioService.adjustStreamVolume(AudioService.java:2163) at com.android.server.audio.AudioService.adjustStreamVolume(AudioService.java:1977) at android.media.IAudioService$Stub.onTransact(IAudioService.java:1258) at android.os.Binder.execTransactInternal(Binder.java:1021)

Custom Audio Source

I'm developing an app for hearing aids - the aids are capable of streaming audio in the form of a low bitrate codec which I can decode into LPCM or other formats on-the-fly.

Is it possible to override one of the classes in this library -- say, SpeechRecognizer -- to provide it with my custom audio stream instead of it using the phone's default mic as the Google Assistant does?

I am willing to accept missing out on hotword detection from the hearing aid (either way, we can't run this stream on our aids indefinitely without severe battery drain), but I would want to be able to provide the speech recognizer with the audio from the hearing aids microphone once the recognizer is activated.

Does this sound possible and would it be possible able to add this functionality to this library?
Even just knowing it is possible would help me, but if it is I am willing to contribute an implementation in the form of a PR.

Its not usefull

  • power consumption way too high
  • cant hear Whats App Voice mails while SpeechRecognizer is listening
  • symbol in top right corner while listening and restart listening is anoying..

Im looking 4 a way the google assistant does that

Have you tried it running for long hours?

I'm integrating this into another app so the user can give commands and not touch the screen.

I've done son grepping to logcat and seems to stop at some point even though the app is still running:

05-26 20:33:24.657 32004 32004 D RecognitionManager: onPrepared: SUCCESS
05-26 20:33:24.775 32004 32004 D RecognitionManager: onReadySpeech
05-26 20:33:29.856 32004 32004 D RecognitionManager: onPrepared: SUCCESS
05-26 20:33:29.970 32004 32004 D RecognitionManager: onReadySpeech
05-26 20:33:35.089 32004 32004 D RecognitionManager: onPrepared: SUCCESS
05-26 20:33:35.209 32004 32004 D RecognitionManager: onReadySpeech
05-26 20:33:36.952 32004 32004 D RecognitionManager: onBeginningOfSpeech
05-26 20:33:37.978 32004 32004 D RecognitionManager: onEndOfSpeech
05-26 20:33:38.121 32004 32004 D RecognitionManager: onReadySpeech
05-26 20:33:43.221 32004 32004 D RecognitionManager: onPrepared: SUCCESS

@StephenVinouze Have you run it for several hours?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.