我正在构建一个使用语音命令执行某些功能的应用程序.我从这里得到了一些代码
private static final int SPEECH_REQUEST_CODE = 0;
// Create an intent that can start the Speech Recognizer activity
private void displaySpeechRecognizer() {
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
// Start the activity, the intent will be populated with the speech text
startActivityForResult(intent, SPEECH_REQUEST_CODE);
}
// This callback is invoked when the Speech Recognizer returns.
// This is where you process the intent and extract the speech text from the intent.
@Override
protected void onActivityResult(int requestCode, int …Run Code Online (Sandbox Code Playgroud) 我有一个关于如何使用.dll/.libs的一般性问题.我正在创建一个.dll用于我的项目,但是,我注意到当我去编译时,我需要静态链接与.dll关联的.lib以便编译项目(否则会出现链接错误"致命错误LNK1107:文件无效或损坏:无法读取0x300").所以稍后当我重新启动我的项目,然后在将来更新它时,我是否需要发布一个新的.exe和一个新的.dll而不是一个新的.dll?如果是这样的话,为什么还要使用.dll呢?
我正在尝试将单词转换为语音.
直到现在我都试过这个:
<?php
$text = "Hello this is a test for voice api of google";
// Name of the MP3 file generated using the MD5 hash
$file = md5($text);
// Save the MP3 file in this folder with the .mp3 extension
$file = "audio/" . $file .".mp3";
if($file) {
echo "created";
} else {
echo "not created";
}
// If the MP3 file exists, do not create a new request
if (!file_exists($file)) {
$mp3 = file_get_contents( …Run Code Online (Sandbox Code Playgroud) 在我尝试使用PocketSphinx for Android之前,我使用了Google的语音识别API.我不需要设置搜索名称或字典文件.它只是承认了所说的每一个字.
现在,在PocketSphinx中,我需要这样做.但是我只能找到如何为一个单词设置识别,或者设置字典(演示项目中可用的字典只有很少的单词),识别器认为这些是唯一存在的单词,这意味着如果有人说类似的话,识别器认为它是字典中列出的单词.
我只是想问,我怎么能设置一些搜索名称,或者如何设置它来识别所有可用的单词(甚至是大量的单词)?也许某人有一个包含大量单词的字典文件?
我对谷歌离线语音识别进行了研究.但它在谷歌nexus 5(操作系统:-4.4)工作正常,但如果我在三星galaxy s5(操作系统:-5.0)实现相同的构建,它无法识别,它显示此错误:
8- ERROR_RECOGNIZER_BUSY.
以下是我的代码.通过保持此链接作为参考,我做了一些更改http://www.truiton.com/2014/06/android-speech-recognition-without-dialog-custom-activity/
没有互联网语音必须承认.我曾经在Pocket sphinx上工作,但它需要大量的侧面声音,因此客户拒绝了它.
public class VoiceRecognitionActivity extends Activity implements RecognitionListener {
private TextView returnedText;
private static ProgressBar progressBar;
private static SpeechRecognizer speech = null;
private static Intent recognizerIntent;
private String LOG_TAG = "VoiceRecognitionActivity";
private Button button1;
Activity activity = VoiceRecognitionActivity.this;
private TextView textView2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
returnedText = (TextView) findViewById(R.id.textView1);
textView2 = (TextView) findViewById(R.id.textView2);
progressBar = (ProgressBar) findViewById(R.id.progressBar1);
button1 = (Button) findViewById(R.id.button1);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
// toggleButton = (ToggleButton) findViewById(R.id.toggleButton1);
PackageManager …Run Code Online (Sandbox Code Playgroud) android speech-recognition speech-to-text android-intent google-voice-search
What are the steps required to use PocketSphinx on Android?
I have found various hints around the web that it is possible, but not real answers and hence I ask my question here.
有人知道已经托管的任何好的服务器端语音识别引擎吗?即我希望能够调用一个简单的Web API发布一些声音数据并获取文本.不必是免费的 - 但希望可以免费试用.
据我所知,当一个人通过电话讲话时,由于使用的麦克风/声道/扬声器的频率响应,他听起来有点不同.
我一直在使用Python语音信号处理.我想知道如何模拟这种效果.我需要设计过滤器吗?
我想建立我的语法以接受多个数字.当我重复这个数字就像说'二十一'时,它有一个错误.所以我不断减少我的代码以找到问题.我为语法构建器提供了以下代码:
string[] numberString = { "one" };
Choices numberChoices = new Choices();
for (int i = 0; i < numberString.Length; i++)
{
numberChoices.Add(new SemanticResultValue(numberString[i], numberString[i]));
}
gb[1].Append(new SemanticResultKey("op1", (GrammarBuilder)numberChoices), 1, 2);
Run Code Online (Sandbox Code Playgroud)
现在,当我发出"一个"时,它仍然给了我这个例外

当我搜索它时,它声明这是我的代码之外的一个例外,我想知道这是Microsoft.Speech dll中的错误还是我遗漏了一些东西
编辑1:
我玩了代码,并将识别为Async,如下所示:
sre.RecognizeAsync(RecognizeMode.Multiple);
Run Code Online (Sandbox Code Playgroud)
代替
sre.Recognize();
Run Code Online (Sandbox Code Playgroud)
现在,当我说'二十一'时,它会得到这个例外:base = {"规则'root中的重复语义键'op1'."}
我知道问题在于语法,但我确实为'op1'重复了这个问题.我错过了什么?
我正在做和做的应用程序:
1:如果麦克风检测到某些噪音,它会开始录制音频,直到没有检测到噪音.之后,音频被录制到wav文件中.
2:我必须在上面检测一些字.只有5到10个字可供检测.
到目前为止,我的代码只执行第一部分(检测噪声和录制音频).现在,我有一个包含以下单词的列表:help, please, yes, no, could, you, after, tomorrow.我需要一种离线方式来检测我的声音是否包含这些单词.这可能吗?我怎样才能做到这一点?我正在使用linux,无法将我的操作系统更改为Windows或使用虚拟机.
我正在考虑使用声音的频谱图,创建一个火车数据库并使用一些分类器进行预测.例如,这是一个单词的谱图.这是一个很好的技术吗?
谢谢.