speech-recognition

Web speech API grammar

試著忘記壹切 提交于 2020-08-07 09:48:10
问题 Can somebody please tell me what this const grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghost | white | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white |

Python speech recognition error - Invalid number of channels

Deadly 提交于 2020-07-28 04:22:11
问题 I'm running a speech recognition code on python as part of a project. I'm facing a really odd kind of a problem When I put the speech recognition code inside a function like: def loop(): r=sr.Recognizer() with sr.Microphone(device_index=2) as source: print("say something") audio = r.listen(source) try: print("you said "+r.recognize_google(audio)) except sr.UnknownValueError: print("Could not understand") except sr.RequestError as e: print("errpr: {0}".format(e)) It gives me the following

Python speech recognition error - Invalid number of channels

半腔热情 提交于 2020-07-28 04:22:04
问题 I'm running a speech recognition code on python as part of a project. I'm facing a really odd kind of a problem When I put the speech recognition code inside a function like: def loop(): r=sr.Recognizer() with sr.Microphone(device_index=2) as source: print("say something") audio = r.listen(source) try: print("you said "+r.recognize_google(audio)) except sr.UnknownValueError: print("Could not understand") except sr.RequestError as e: print("errpr: {0}".format(e)) It gives me the following

Python Pocketsphinx: Keyword not being recognised from a .wav file

南楼画角 提交于 2020-07-22 06:12:02
问题 I'm trying to detect the keyword temperature from a recording of me only saying the phase temperature (there are no other words present). Originally I used the keyword hello and it worked fine but whenever I try with any other word it does not. My current code is as follows: import pocketsphinx as ps import requests import json import sys, os model_path = ps.get_model_path() data_path = ps.get_data_path() # Call to API def get_temperature(): headers = { 'accept': 'application/json', 'x-api

Use of SAPI Speech Recognition in a VBS Script?

无人久伴 提交于 2020-07-19 04:29:32
问题 I found this one-line example that allows to use the Windows SAPI Text-to-Speech feature in VBScript: CreateObject("SAPI.SpVoice").Speak("This is a test") I wonder if the SAPI Speech Recognition could be used in a VBScript program in the same easy way. When I seek for such information the tons of SAPI information that appear are related to C++, like the Microsoft SAPI site, or to Text-to-Speech in VBS. I tried to find documentation about the SAPI COM object Speech Recognition part that could

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

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

半世苍凉 提交于 2020-07-10 03:11:10
问题 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

How to handle homophones in speech recognition?

自作多情 提交于 2020-07-05 10:43:08
问题 For those who are not familiar with what a homophone is, I provide the following examples: our & are hi & high to & too & two While using the Speech API included with iOS, I am encountering situations where a user may say one of these words, but it will not always return the word I want. I looked into the [alternativeSubstrings] (link) property wondering if this would help, but in my testing of the above words, it always comes back empty. I also looked into the Natural Language API, but could

Why 128 mel bands are used in mel spectrograms?

六月ゝ 毕业季﹏ 提交于 2020-06-29 06:42:19
问题 I am using the mel spectrogram function which can be found here:Mel Spectrogram Librosa I use it as follows: signal = librosa.feature.melspectrogram(y=waveform, sr=sample_rate, n_fft=512, n_mels=128) Why is 128 mel bands use? I understand that the mel filterbank is used to simulate the "filterbank" in human ears, that's why it discriminates higher frequencies. I am designing and implementing a Speech-to-Text with Deep Learning and when I used n_mels=64, it didn't work at all, it only works

iOS13 OnDevice Speech Recognition (supportsOnDeviceRecognition flag)

允我心安 提交于 2020-06-29 03:46:31
问题 I'm trying to get the iOS 13 OnDevice Speech recognition working. However validating the supportsOnDeviceRecognition flag, which is the preliminary step to enable OnDevice recognition, always returns false. I'm using iPad 6th Gen with iOS 13.3. I tested supportsOnDeviceRecognition flag with other devices and see it works only for some. private var speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: "en_US")) . . . if #available(iOS 13, *) { if speechRecognizer?