當前位置:首頁 » 安卓系統 » android語音識別

android語音識別

發布時間: 2022-01-12 17:41:53

⑴ 怎樣輕松實現語音識別在Android開發中

語音識別 2008年Google語音搜索在iphone平台上線,Android 1.5 將語音識別應用到搜索功能上。 手動輸入是目前主要與手機互動的方式,語音搜索宗旨是最大限度地改善人機交互的便捷性。 在玩游戲時,通過語音來控制操作,更顯得人性化,體驗更佳。 Android 中主要通過RecognizerIntent來實現語音識別。 RecognizerIntent包括的常量 ACTION_RECOGNIZE_SPEECH ACTION_WEB_SEARCH EXTRA_LANGUAGE EXTRA_LANGUAGE_MODEL EXTRA_MAX_RESULTS EXTRA_PROMPT EXTRA_RESULTS LANGUAGE_MODEL_FREE_FORM LANGUAGE_MODEL_WEB_SEARCH RESULT_AUDIO_ERROR RESULT_CLIENT_ERROR RESULT_NETWORK_ERROR RESULT_NO_MATCH RESULT_SERVER_ERROR // 打開語音識別 Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); intent.putExtra(RecognizerIntent.EXTRA_PROMPT, 「開始語音"); startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE); 在模擬器上找不到語音設備,會拋出異常ActivityNotFoundException。 示例: 點擊「開始使用語音識別」按鈕後,開始語音輸入,然後在onActivityResult方法中取得結果並顯示出來 protect void onActivityResult(int requestCode, int resultCode, Intent data) { if(requestCode == VOICE_RECOGNITION_REQUEST_CODE && resultCode == RESULT_OK) { ArrayList<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); StringBuffer sb = new StringBuffer(); for(int i=0; i<results.size; i++) { sb.append(results.get(i)); } Toast.makeText(this, sb.toString(), Toast.LENGTH_LONG).show(); super.onActivityResult(requestCode, resultCode, data); }

⑵ android語音識別Google Voice Search,Recognizer

2.3和2.2 都是支持德語漢語的。不過2.4還不清楚,應該沒問題

⑶ android 百度怎麼使用語音識別轉化成文字

網路Android語音識別SDK分在線與離線兩種,這篇文章介紹在線SDK的使用方法。
在線SDK是以JAR包和動態鏈接庫形式發布和使用,可以從網路開放雲平台網站中下載SDK及使用說明文檔。
http://developer..com/wiki/index.php?title=docs/cplat/media/voice
完成語音SDK的集成分以下幾步,本文將一步步介紹SDK集成方法。

1、注冊開放開放平台
點擊管理控制台,選擇移動應用管理

⑷ 有哪些類型的安卓手機具有語音識別的功能

只要是安卓的裝個《靈犀》軟體都能語音識別的。

⑸ 如何在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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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語音識別,藉助於雲端技術可以識別用戶的語音輸入,包括語音控制等技術,下面我們將利用Google提供的Api實現這一功能。功能點為:通過用戶語音將用戶輸入的語音識別出來,並列印在列表上。 首先建立如下的一個activity,並在button下建立android實現語音識別有哪些方法

⑺ android本地語音識別如何實現不需要太復雜,只需要能識別簡單的數字就好

肯定不難,就是沒有公司能在其中有利益,所以,沒有人放出來。
他們故意讓你在線識別,目標就是有一天你在他的網上消費,要不然白服務啊。

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

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

⑼ android自己實現離線語音識別了嗎

如果要離線語言識別,勢必要下載很大的語音解析包,很多人是不願意下載這么大的應用的

⑽ android 百度語音識別頁面怎麼修改

蘋果的iPhone 有語音識別用的是Google 的技術,做為Google 力推的Android 自然會將其核心技術往Android 系統裡面植入,並結合google 的雲端技術將其發揚光大。
所以Google Voice Recognition在Android 的實現就變得極其輕松。
語音識別,藉助於雲端技術可以識別用戶的語音輸入,包括語音控制等技術,下面我們將利用Google 提供的Api 實現這一功能。
功能點為:通過用戶語音將用戶輸入的語音識別出來,並列印在列表上。
功能界面如下:

用戶通過點擊speak按鈕顯示界面:

用戶說完話後,將提交到雲端搜索

在雲端搜索完成後,返回列印數據:

熱點內容
單片機android 發布:2024-09-20 09:07:24 瀏覽:759
如何提高三星a7安卓版本 發布:2024-09-20 08:42:35 瀏覽:659
如何更換伺服器網站 發布:2024-09-20 08:42:34 瀏覽:306
子彈演算法 發布:2024-09-20 08:41:55 瀏覽:284
手機版網易我的世界伺服器推薦 發布:2024-09-20 08:41:52 瀏覽:812
安卓x7怎麼邊打游戲邊看視頻 發布:2024-09-20 08:41:52 瀏覽:158
sql資料庫安全 發布:2024-09-20 08:31:32 瀏覽:89
蘋果連接id伺服器出錯是怎麼回事 發布:2024-09-20 08:01:07 瀏覽:503
編程鍵是什麼 發布:2024-09-20 07:52:47 瀏覽:653
學考密碼重置要求的證件是什麼 發布:2024-09-20 07:19:46 瀏覽:477