当前位置:首页 » 安卓系统 » 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按钮显示界面:

用户说完话后,将提交到云端搜索

在云端搜索完成后,返回打印数据:

热点内容
如何提高三星a7安卓版本 发布:2024-09-20 08:42:35 浏览:658
如何更换服务器网站 发布:2024-09-20 08:42:34 浏览:305
子弹算法 发布:2024-09-20 08:41:55 浏览:283
手机版网易我的世界服务器推荐 发布:2024-09-20 08:41:52 浏览:811
安卓x7怎么边打游戏边看视频 发布:2024-09-20 08:41:52 浏览:157
sql数据库安全 发布:2024-09-20 08:31:32 浏览:88
苹果连接id服务器出错是怎么回事 发布:2024-09-20 08:01:07 浏览:502
编程键是什么 发布:2024-09-20 07:52:47 浏览:651
学考密码重置要求的证件是什么 发布:2024-09-20 07:19:46 浏览:477
电脑主服务器怎么开机 发布:2024-09-20 07:19:07 浏览:728