example of AlwaysOnHotwordDetector in Android

Unless I have a huge blind spot, I don’t think third-party applications can make use of this API. Its strange that AlwaysOnHotwordDetector (and related classes VoiceInteractionService etc.) have been granted public access. If you are building a privileged app, look through these test projects from AOSP: Voice Interaction – Basic AlwaysOnHotwordDetector usage/implementation http://androidxref.com/5.0.0_r2/xref/frameworks/base/tests/VoiceInteraction/ Voice Enrollment … Read more

Is there a way to use the Javascript SpeechRecognition API with an audio file?

The short answer is No. The Web Speech Api Specification does not prohibit this (the browser could allow the end-user to choose a file to use as input), but the audio input stream is never provided to the calling javascript code (in the current draft version), so you don’t have any way to read or … Read more

Split speech audio file on words in python

An easier way to do this is using pydub module. recent addition of silent utilities does all the heavy lifting such as setting up silence threahold , setting up silence length. etc and simplifies code significantly as opposed to other methods mentioned. Here is an demo implementation , inspiration from here Setup: I had a … Read more

onServiceConnected never called after bindService method

I’ve just experienced another version of this problem, with the same symptom of onServiceConnected(…) not being called. The cause was different in my case. You must make sure to have a service declaration in your AndroidManifest.xml within the application tag – this was the root of the problem for me. <application android:name=”.YourAppTitle” android:icon=”@drawable/icon” android:label=”@string/app_name”> <activity … Read more

Saving audio input of Android Stock speech recognition engine

You haven’t included your code for actually writing out the PCM data, so its hard to diagnose, but if you are hearing strange noises then it looks most likely you have the wrong endian when you are writing the data, or the wrong number of channels. Getting the sample rate wrong will only result in … Read more

Can I write SQL using speech recognition?

Yes. SQL is well-suited to speech recognition (as well-suited as a programming language can be, that is), given it’s limited vocabulary and sentence-like structure. Aside from formatting the SQL so that it looks nice, I can dictate it much faster than typing. Dictating code isn’t for everyone, however. It can be quite frustrating in the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)