标签: speech-recognition

ImportError:没有名为request的模块

我正在尝试SpeechRecognition在我的机器上安装python .当我尝试安装包时pip install SpeechRecognition.我收到以下错误.

import json, urllib.request

ImportError: No module named request
Run Code Online (Sandbox Code Playgroud)

然后我提到并安装了pip install requests我正在收到的请求Requirement already satisfied.但是我仍然无法安装SpeechRecognition.请让我知道我在做什么错误.谢谢你提前

python speech-recognition

43
推荐指数
3
解决办法
11万
查看次数

在Python中删除String中的引号

我有一个python代码,可以使用谷歌STT引擎识别语音并给我回复结果,但我得到的结果是带有"引号"的字符串.我不想在我的代码中使用引号,因为我将使用它来运行许多命令,但它不起作用.到目前为止,我没有尝试任何东西,因为我没有尝试任何东西!这是python代码中将识别语音的函数:

def recog():
    p = subprocess.Popen(['./speech-recog.sh'], stdout=subprocess.PIPE,
                                            stderr=subprocess.PIPE)
    global out,err
    out, err = p.communicate()
    print out
Run Code Online (Sandbox Code Playgroud)

这是speech-recog.sh:

#!/bin/bash

hardware="plughw:1,0"
duration="3"
lang="en"
hw_bool=0
dur_bool=0
lang_bool=0
for var in "$@"
do
    if [ "$var" == "-D" ] ; then
        hw_bool=1
    elif [ "$var" == "-d" ] ; then
        dur_bool=1
    elif [ "$var" == "-l" ] ; then
        lang_bool=1
    elif [ $hw_bool == 1 ] ; then
        hw_bool=0
        hardware="$var"
    elif [ $dur_bool == 1 ] ; then
        dur_bool=0
        duration="$var"
    elif [ $lang_bool == …
Run Code Online (Sandbox Code Playgroud)

python string speech-recognition google-voice

43
推荐指数
7
解决办法
16万
查看次数

Voice Recognition stops listening after a few seconds

I tried a lot but can´t find it out, so I hope you can help me.

I am trying to build my own voice recognition app, which doesn´t show up the dialog.

I already wrote some code and it works quite fine, but my problem is that the recognizer seems to stop without any errors or other messanges in the LogCat.

A strange fact is that the "onRmsChanged" from the "RecognitionListener" interface is still called all the time, but no …

android speech-recognition

40
推荐指数
2
解决办法
3万
查看次数

保存Android Stock语音识别引擎的音频输入

我试图在文件中保存由android的语音识别服务监听的音频数据.

实际上我RecognitionListener按照这里的解释实现: Android上的语音到文本

将数据保存到缓冲区中,如下所示: 捕获发送到Google语音识别服务器的音频

并将缓冲区写入Wav文件,如此处所示. Android将原始字节记录到HVEp Streaming的WAVE文件中

我的问题是如何获得适当的音频设置以保存在wav文件的标题中.事实上,当我播放wav文件时,只听到奇怪的噪音,这个参数,

short nChannels=2;// audio channels
int sRate=44100;    // Sample rate
short bSamples = 16;// byteSample
Run Code Online (Sandbox Code Playgroud)

或者没有这个:

short nChannels=1;// audio channels
int sRate=8000;    // Sample rate
short bSamples = 16;// byteSample
Run Code Online (Sandbox Code Playgroud)

令人困惑的是从logcat查看语音识别任务的参数我发现第一个Set PLAYBACK采样率为44100 HZ:

    12-20 14:41:34.007: DEBUG/AudioHardwareALSA(2364): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
    12-20 14:41:34.007: DEBUG/AudioHardwareALSA(2364): Using 2 channels for PLAYBACK.
    12-20 14:41:34.007: DEBUG/AudioHardwareALSA(2364): Set PLAYBACK sample rate to 44100 HZ
    12-20 14:41:34.007: DEBUG/AudioHardwareALSA(2364): …
Run Code Online (Sandbox Code Playgroud)

audio android speech-recognition wav voice-recognition

38
推荐指数
1
解决办法
7239
查看次数

我可以使用语音识别编写SQL吗?

我键入时手腕疼痛,我想开始使用语音识别编写SQL语句,存储过程和视图.

sql ergonomics speech-recognition code-by-voice naturallyspeaking

36
推荐指数
2
解决办法
7332
查看次数

Chrome实施HTML5语音识别API的语言代码是什么?

Chrome实施了HTML5语音识别API.支持多种语言.我想知道支持哪些语言以及HTML元素lang属性中使用的每种语言的相应代码.

例如:

  • 波兰语(pl-PL)
  • 土耳其语(tr-TR)

谢谢!

html5 voice speech-recognition google-chrome voice-recognition

34
推荐指数
3
解决办法
4万
查看次数

onServiceConnected从未在bindService方法之后调用

我有一个特殊情况:由广播接收器启动的服务启动一项活动.我希望此活动能够与服务进行通信.我选择使用AIDL来实现它.除了活动中的bindService()方法之外,一切似乎都很好onCreate().实际上,bindService()抛出一个空指针异常,因为在服务方法时onServiceConnected()从不调用onBind().无论如何bindService()返回true.该服务显然是活跃的,因为它启动了活动.我知道从服务中调用活动可能听起来很奇怪,但不幸的是,这是在服务中进行语音识别的唯一方法.

提前致谢

service binding android speech-recognition

33
推荐指数
6
解决办法
4万
查看次数

语音识别与编程

在编程时,有没有人使用Dragon Naturally Speaking语音识别软件取得成功?

我很想知道,因为我觉得它比我手动打字要快得多,而且我的carpol-tunnel更容易.

我每天都在visual basic 6 ide,visual studio 2008 ide +团队资源管理器,编写电子邮件以及通过Windows Live IM聊天.

我需要一个基于命令的界面,我可以将语音命令绑定到击键,在拼写/说出单词/说出没有空格的单词之间切换等.

任何评论都非常感谢.

speech-recognition

31
推荐指数
2
解决办法
3万
查看次数

Android上的语音识别与录制的声音剪辑?

我在Android上使用了语音识别功能,我喜欢它.这是我的客户最受好评的功能之一.但是,格式有些限制.你必须调用识别器意图,让它将转录的录音发送到谷歌,并等待文本回来.

我的一些想法需要在我的应用程序中录制音频,然后将剪辑发送到谷歌进行转录.

有没有什么方法可以发送音频剪辑进行语音处理?

android voice speech-recognition voice-recognition

31
推荐指数
2
解决办法
3万
查看次数

Android中AlwaysOnHotwordDetector的示例

有人可以提供一个如何在Android中使用新的AlwaysOnHotwordDetector类的示例吗?

我想构建一个应用程序,当应用程序在后台运行时,可以检测到"下一个","后退"或"暂停"等热门词.

android speech-recognition android-5.0-lollipop

30
推荐指数
1
解决办法
7825
查看次数