voice-recognition

Get numbers from Android Voice Regnition

会有一股神秘感。 提交于 2021-02-18 19:40:56
问题 I have implemented a recognizer intent like this. Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Tell me stuff"); startActivityForResult(intent, REQUEST_CODE); With a return like this if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) { ArrayList<String> matches = data.getStringArrayListExtra( RecognizerIntent.EXTRA

How to implement Voice Activity Detection in Java?

亡梦爱人 提交于 2021-02-18 17:05:22
问题 I need to implement a voice activity detection algorithm in Java so that I can know when to start and/or stop recording audio. I am looking for an algorithm that can take either a byte[], a target-data-line, or an audio file as input. Also, a solution would preferably not use external dependencies. 回答1: Give a look at TarsosDSP as source of inspiration: It is so far the best open source Java library to deal with Audio Detection. It is purely written in Java and briefly provides:

Speech recognition intent starts before TTS ends speaking

99封情书 提交于 2021-02-10 05:28:48
问题 I've developed an Android App which give commands using tts (Text to Speech) and then listen to the vocal answer of the user using Speech Recognition Intent. Obviously, only when tts finishes to speak, then the intent of speech recognition is thrown. Sometimes, mostly when I swich from an activity to another, or when I activate this process through a button, THE SPEECH RECOGNIZER INTENT STARTS BEFORE TTS FINISHES TO TALK! The problem is that the same text of the command is then acquired and

Python3 OSError: [Errno -9988] Stream closed

怎甘沉沦 提交于 2021-01-28 06:10:07
问题 I'm working on voice recognition system with Raspberry pi 3B and while running some code I face some problem which is given below. I was tried so many stuffs from the internet but couldn't found some specific problem so please help me about below error! ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2495:(snd

How to use any string from list as a variable?

北战南征 提交于 2021-01-07 02:55:39
问题 I would like to know how i could have a variable A to be any random string from ListA and B to be any random string from ListB ? I would like to use this in a voice assistant and Voice would be the string containing the recognized sentence. It should make a google search of anything I say between string A and string B . import re import webbrowser ListA = ["search", "research"] ListB = ["on google", "using google"] A = # any string from ListA B = # any string from ListB Search = re.search(A +

How to use any string from list as a variable?

▼魔方 西西 提交于 2021-01-07 02:54:30
问题 I would like to know how i could have a variable A to be any random string from ListA and B to be any random string from ListB ? I would like to use this in a voice assistant and Voice would be the string containing the recognized sentence. It should make a google search of anything I say between string A and string B . import re import webbrowser ListA = ["search", "research"] ListB = ["on google", "using google"] A = # any string from ListA B = # any string from ListB Search = re.search(A +

How to use any string from list as a variable?

半腔热情 提交于 2021-01-07 02:54:01
问题 I would like to know how i could have a variable A to be any random string from ListA and B to be any random string from ListB ? I would like to use this in a voice assistant and Voice would be the string containing the recognized sentence. It should make a google search of anything I say between string A and string B . import re import webbrowser ListA = ["search", "research"] ListB = ["on google", "using google"] A = # any string from ListA B = # any string from ListB Search = re.search(A +

Python Pocketsphinx: Keyword isn't recognised when using Decoder class

纵饮孤独 提交于 2020-07-10 03:14:54
问题 I'm trying to detect a keyword from a .wav file using Pocketsphinx, specifically with the decoder class. When I give it this .wav file and print what it detects it isnt even close. Here is the code: import pocketsphinx as ps import requests import json import sys, os import subprocess model_path = ps.get_model_path() data_path = ps.get_data_path() print("start") print(os.getcwd()) subprocess.call("sox -V4 /home/miro/client_audio.wav -r 16000 -c 1 client_audio.wav", shell=True) config = ps