導航:首頁 > 操作系統 > android語音識別demo

android語音識別demo

發布時間:2023-02-03 02:44:32

android 上的語音識別是怎麼實現

V01GA]是通過瀏覽器訪問,語音類型為文件,不限制提交量,顯示的是電信。號碼。
[V01GB]是通過瀏覽器訪問,語音類型為TTS,不限制提交量,顯示的是電信。號碼。
[V01GC]是通過瀏覽器訪問,支持動態菜單,支持回撥,語音類型為文件,不限制提交量,顯示的是電信號碼。
[V01GD]是通過瀏覽器訪問,支持動態菜單,支持回撥,語音類型為TTS,不限制提交量,顯示的是電信。號碼。

② android 語音識別怎麼開

語音識別如何做的是嗎,如果是自己從頭開發,難度太大,可以通過購買第三方介面里解決。

③ 如何用pocketsphinx實現android離線語音識別

1.搭建Android開發環境和NDK配置就不說了,網上教程很多。
2.下載sphinxbase – snapshot,pocketsphinx – snapshot和PocketsphinxAndroidDemo – snapshot,然後吧sphinxbase和pocketsphinx放到同一個文件夾下,用./autogen.sh &&./configure && make && make install的方法先安裝sphinxbase,再安裝pocketsphinx。
3.把PocketSphinxDemo導入Eclipse,進入PocketSphinxDemo/jni文件夾,把Android.mk里的SPHINX_PATH變數改成sphinxbase和pocketsphinx的父目錄。
4.在jni文件夾運行ndk-build命令。(當然,需要先配置好ndk)
5.在Eclipse里,PocketSphinxDemo項目的Properties中,選擇Builders,可以看到SWIG和NDK,NDK的build其實可以通過4中的命令來完成,也可以通過eclipse自動完成。
選擇NDK,點擊Edit按鈕,出現的框中,在Location區域選擇ndk文件夾,然後點擊Refresh選項卡,選擇「The project containing the selected resource」,點擊Build Options選項卡,取消選擇「Specify working set of relevant resources」。
選擇SWIG,點擊Edit,在Refresh選項卡中選擇 「The folder containing the selected resource」,在Build Options選項卡中取消選擇「Specifiy working set of relevant resources」。
6.把手機和電腦連接,把pocketsphinx/model/hmm/en_US里的hub4wsj_sc_8k,hmm/en_US,lm/en_US放入手機的某個文件夾,如用adb push把使手機存在如下文件或文件夾:

/sdcard/Android/data/e.cmu.pocketsphinx/hmm/en_US/hub4wsj_sc_8k
/sdcard/Android/data/e.cmu.pocketsphinx/lm/en_US/hub4.5000.dic
/sdcard/Android/data/e.cmu.pocketsphinx/lm/en_US/hub4.5000.DMP

7.在PocketSphinxDemo項目中使 RecognizerTask.java里c.setString函數中的參數符合6中存放的文件和文件夾。
8.構建運行

④ android 語音識別怎麼做

基本沒有本地識別,都是錄音後放到伺服器去識別,現在的三方SDK有科大訊飛

⑤ Android 上的語音識別是怎麼實現

語音識別,藉助於雲端技術可以識別用戶的語音輸入,包括語音控制等技術,下面我們將利用Google 提供的Api 實現這一功能。
功能點為:通過用戶語音將用戶輸入的語音識別出來,並列印在列表上。
功能界面如下:

步驟閱讀
2
用戶通過點擊speak按鈕顯示界面:
步驟閱讀
3
用戶說完話後,將提交到雲端搜索
步驟閱讀
4
在雲端搜索完成後,返回列印數據:
步驟閱讀

5
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a of the License at
*

*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.example.android.apis.app;

import com.example.android.apis.R;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.speech.RecognizerIntent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

/**
* Sample code that invokes the speech recognition intent API.
*/
public class VoiceRecognition extends Activity implements OnClickListener {

private static final int VOICE_RECOGNITION_REQUEST_CODE = 1234;

private ListView mList;

/**
* Called with the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// Inflate our UI from its XML layout description.
setContentView(R.layout.voice_recognition);

// Get display items for later interaction
Button speakButton = (Button) findViewById(R.id.btn_speak);

mList = (ListView) findViewById(R.id.list);

// Check to see if a recognition activity is present
PackageManager pm = getPackageManager();
List activities = pm.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
if (activities.size() != 0) {
speakButton.setOnClickListener(this);
} else {
speakButton.setEnabled(false);
speakButton.setText("Recognizer not present");
}
}

/**
* Handle the click on the start recognition button.
*/
public void onClick(View v) {
if (v.getId() == R.id.btn_speak) {
startVoiceRecognitionActivity();
}
}

/**
* Fire an intent to start the speech recognition activity.
*/
private void startVoiceRecognitionActivity() {
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speech recognition demo");
startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);
}

/**
* Handle the results from the recognition activity.
*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) {
// Fill the list view with the strings the recognizer thought it could have heard
ArrayList matches = data.getStringArrayListExtra(
RecognizerIntent.EXTRA_RESULTS);
mList.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1,
matches));
}

super.onActivityResult(requestCode, resultCode, data);
}

⑥ Android中如何添加語音識別功能詳細步驟和代碼

android.speech.RecognizerIntent這個包里。前提是你的手機支持此功能。
開啟操作:
Intent
intent
=
newIntent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);//開啟語音識別功能。
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
//設置語言類型。
intent.putExtra(RecognizerIntent.EXTRA_PROMPT,
"請說話,我識別");
startActivityForResult(intent,REQUEST_CODE);
在onActivityResult()里用:
data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS)取得google雲端反饋的數據即可。

⑦ android模擬器如何使用語音識別

程序讀取一個事先的錄音文件,然後將其數據導入語音識別程序中進行識別,識別結果可通過控制項顯示出來

⑧ android如何自定義語音識別

google的語音識別返回的是一個String list,你和你預設的單詞對比一下吧.

⑨ android怎麼用上訊飛語音做語音識別

下載SDK和DEMO,閱讀Demo源代碼結合官方說明文檔植入app即可.

⑩ Android 上的語音識別是怎麼實現

如果你想自己寫引擎,我不太清楚,我只知道TTS引擎可以自己寫,Voice Recognize就不知道了,不過利用Android提供的API就很容易了,API demo有示例,很簡單。但如果用原生ROM可以直接開發,要是用第三方ROM就可能開發不了,需要先安裝語音搜索,也就是語音識別的引擎,因為很多ROM製造團隊刪除了語音識別引擎

閱讀全文

與android語音識別demo相關的資料

熱點內容
網盤源碼系統商業 瀏覽:466
php網路工程師崗位職責 瀏覽:998
土豆伺服器風險怎麼樣 瀏覽:990
win11怎麼安裝安卓游戲 瀏覽:555
程序員報考內容 瀏覽:302
su3維文本命令 瀏覽:871
單片機存儲器類型 瀏覽:13
unix查看埠命令 瀏覽:21
程序員團建活動有哪些 瀏覽:67
libzip壓縮解壓 瀏覽:943
廣州銀行app如何導流水 瀏覽:385
什麼是寫命令 瀏覽:687
程序員眼中的道德 瀏覽:506
文件解壓後亂碼是什麼原因 瀏覽:730
php路徑轉換 瀏覽:188
php中flag 瀏覽:183
當程序員要做什麼准備 瀏覽:284
pinctrllinux 瀏覽:901
lzw壓縮工具 瀏覽:864
luae加密插件破解版 瀏覽:141