voicerecognitionvoiceover中文怎么读读

Google Voice Recognition Android实现语音识别-android100学习网
Google Voice Recognition Android实现语音识别
苹果的iphone的语音识别功能使用的是Google的技术,做为Google力推的Android自然会将其核心技术植入到Android系统里面,并结合google的云端技术将其发扬光大。所以Google Voice Recognition在Android中的实现就...
苹果的iphone的语音识别功能使用的是Google的技术,做为Google力推的Android自然会将其核心技术植入到Android系统里面,并结合google的云端技术将其发扬光大。
所以Google Voice Recognition在Android中的实现就变得非常轻松。
Android语音识别,借助于云端技术可以识别用户的语音输入,包括语音控制等技术,下面我们将利用Google提供的Api实现这一功能。
功能点为:通过用户语音将用户输入的语音识别出来,并打印在列表上。
功能界面如下:
用户通过点击speak按钮显示界面:
用户说完话后,将提交到云端搜索:
在云端搜索完成后,返回打印数据:
完整代码如下:
package com.example.android.apis.
import com.example.android.apis.R;
import android.app.A
import android.content.I
import android.content.pm.PackageM
import android.content.pm.ResolveI
import android.os.B
import android.speech.RecognizerI
import android.view.V
import android.view.View.OnClickL
import android.widget.ArrayA
import android.widget.B
import android.widget.ListV
import java.util.ArrayL
import java.util.L
&* 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 mL
&&&&&* Called with the activity is first created.
&&&&@Override
&&&&public void onCreate(Bundle savedInstanceState) {
&&&&&&&&super.onCreate(savedInstanceState);
&&&&&&&&setContentView(R.layout.voice_recognition);
&&&&&&&&Button speakButton = (Button) findViewById(R.id.btn_speak);
&&&&&&&&mList = (ListView) findViewById(R.id.list);
&&&&&&&&PackageManager pm = getPackageManager();
&&&&&&&&List&ResolveInfo& 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) {
&&&&&&&&&&&&
&&&&&&&&&&&&
&&&&&&&&&&&&ArrayList&String& matches = data
&&&&&&&&&&&&&&&&&&&&.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
&&&&&&&&&&&&mList.setAdapter(new ArrayAdapter&String&(this,
&&&&&&&&&&&&&&&&&&&&android.R.layout.simple_list_item_1, matches));
&&&&&&&&super.onActivityResult(requestCode, resultCode, data);Voice Recognition
We're using cookies to improve your experience.
Written by Blathnaid Healy
If you don't like remembering passwords, this could be good news.
Written by Brian Anthony Hernandez
Netflix has introduced Max, a new voice on its video streaming service that recommends movies and TV shows for users based on how they're feeling and their personal preferences. Available only for PlayStation 3 owners in the United States, Max remind...
Written by Jeff Barrett
Jeff Barrett is co-founder of Status Creative, a 2011 PRNewswire winner for Best Use Of Video In Social Media. Follow him @barrettall. Every four years the Olympics bring the world together, albeit briefly. And no matter a person's global location, w...
Written by Marc Georges
We all know the pen is mightier than the sword, but for 21st-century storytellers, the voice could be the one tool to rule them all. With speech-recognition software such as Siri and Dragon Naturally Speaking becoming more widely available to users, ...
Written by Technology Review
Even in an age of vanishing privacy, people using Apple's digital assistant Siri share a distinct concern. Recordings of their actual voices, asking questions that might be personal, travel over the Internet to a remote Apple server for processing. T...
Written by Pete Pachal
As fun as Siri is on the iPhone 4S, you still need to push a button to get her to speak to you. With the Samsung Galaxy S III, users will be able to start interacting with their phones without ever touching them, thanks in part to technology from a s...
Written by Technology Review
Until recently, the idea of holding a conversation with a computer seemed pure science fiction. If you asked a computer to &open the pod bay doors&—well, that was only in movies. But things are changing, and quickly. A growing number of people now ta...
Written by Emily Price
Soon you may be able to control some of your favorite apps using your voice thanks to AT&T. For decades AT&T researchers have been working on a speech recognition technology called Watson. The software takes speech and turns it into text. While that ...
Written by Amy-Mae Elliott
iPhone 4S owners may get to listen to the dulcet tones of Siri, but users of earlier iPhone models can also enjoy similar high-tech wonders through Apple's &Voice Control& functionality. It's a limited tool, especially compared to Siri, but a useful ...
Written by Kate Freeman
Getting Siri's voice-recognition capabilities on your phone just became a possibility for Android users and a bit less expensive for iPhone users. Meet Evi -- a $.99 app for iPhones and free for Android. For such a nominal price, don't expect Evi to ...
Written by GeekSugar
Didn't get an iPhone 4S this holiday? Don't worry -- there are other voice-recognition apps on the market that can stand up to Siri's voice-controlled awesomeness on your devices. In fact, a few of these apps are available for Android and BlackBerry ...
Written by Samantha Murphy Kelly
Voice-recognition giant Nuance announced on Tuesday that it is acquiring Vlingo, the creator of a voice-to-text and voice recognition app that has been the subject of various Nuance lawsuits over patent infringement. But with the growth of virtual as...
Written by Pete Pachal
When it was discovered that the new voice assistant on the iPhone 4S, Siri, didn't identify nearby abortion clinics when asked, it created a firestorm of controversy. After the story circulated widely (with even the NARAL Pro-Choice America Foundatio...
Written by Mashable Video
Scientists have created a computer system that attempts to recognize human emotions such as anger and impatience by analyzing the acoustics of one's voice. Such a system would have obvious implications for perennially frustrating interactive voice re...
Written by Christina Warren
As we noted earlier today, Apple has acquired Siri, a company that makes a very compelling voice-operated personal assistant app for the iPhone. This move has huge implications for the future of mobile
by buying Siri, Apple has ...
Written by Christina Warren
At the beginning of the week, Dag Kittlaus wrote a post for Mashable about the birth of the virtual assistant. Today, Dag's company, Siri, is releasing its iPhone app, Siri Assistant. Siri helps people get things done by combining intelligent voice r...
Written by Barb Dybwad
It appears that the Nexus One's speech-to-text function performs the digital equivalent of washing your mouth out with soap. Reuters discovered that the innovative voice recognition feature converts swear words into a string of # symbols when rendere...
Written by Samuel Axon
YouTube has a global audience, so if you want to reach as many people as possible, you'll have to make sure subtitles are available for your videos. You'll want closed captioning to reach the deaf and hard of hearing, too. Thankfully, that process ha...
Written by Samuel Axon
Since the web first heard about Google's Nexus One smartphone — sorry, &superphone& — reactions have been mixed. Some folks expected it to be a huge leap forward in the Android user experience. Others? Not so much. Now that we know what Google and HT...
Written by Adam Ostrow
Vlingo is launching a new application for Blackberry on Wednesday that allows you to control just about every important feature on the device by using your voice. Once you've downloaded the it (from here starting at 8am et), Vlingo walks you through ...
The Next Big Thing4114人阅读
Android(259)
Google的语音识别是有目共睹的,所以Android上面也是沾了大光了,用起来简单至极。过程如下:1、启动语音识别Activity2、这里处理语音(传到google服务器处理)3、结果以Acitivity的结果返回(onActivityResult)主要用到的类为下面的例子参考了API Demo。package com.
import java.util.ArrayL
import java.util.L
import android.app.A
import android.content.I
import android.content.pm.PackageM
import android.content.pm.ResolveI
import android.os.B
import android.speech.RecognizerI
import android.view.V
import android.view.View.OnClickL
import android.widget.B
import android.widget.TextV
public class VoiceRecognitionDemoActivity extends Activity {
private static final String TAG = &VoiceRecognition&;
private static final int VOICE_RECOGNITION_REQUEST_CODE = 1234;
private TextView textV
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initWidget();
// Check to see if a recognition activity is present
PackageManager pm = getPackageManager();
List&ResolveInfo& activities = pm.queryIntentActivities(
new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);
if (activities.size() != 0) {
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
startVoiceRecognitionActivity();
button.setEnabled(false);
button.setText(&Recognizer not present&);
private void initWidget()
textView = (TextView)findViewById(R.id.tv);
button = (Button)findViewById(R.id.btn);
* Fire an intent to start the speech recognition activity.
private void startVoiceRecognitionActivity() {
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
// Display an hint to the user about what he should say.
intent.putExtra(RecognizerIntent.EXTRA_PROMPT, &请说标准普通话&);//注意不要硬编码
// Given an hint to the recognizer about what the user is going to say
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
// Specify how many results you want to receive. The results will be sorted
// where the first result is the one with higher confidence.
intent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 5);//通常情况下,第一个结果是最准确的。
startActivityForResult(intent, VOICE_RECOGNITION_REQUEST_CODE);
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&String& matches = data.getStringArrayListExtra(
RecognizerIntent.EXTRA_RESULTS);
StringBuilder stringBuilder = new StringBuilder();
int Size = matches.size();
for(int i=0;i&S++i)
stringBuilder.append(matches.get(i));
stringBuilder.append(&\n&);
textView.setText(stringBuilder);
super.onActivityResult(requestCode, resultCode, data);
}结论:在wifi(家里的,1兆带宽)状态下,识别速度飞快。语音包是买手机时预装好的。识别率很高。中文、英文、数字都能很好的识别。用手机的gprs,效果不尽如人意。几次识别都用了30秒左右的时间,体验很糟。
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:3749857次
积分:38967
积分:38967
排名:第69名
原创:566篇
转载:315篇
译文:24篇
评论:999条
大叔的年龄小伙子的心,喜欢折腾,对自己感兴趣的事物有一种痴迷劲儿,不弄出个所以然来是不会轻易放手的。年龄大再加上事情多,非全速前进不可了。
(4)(2)(1)(2)(4)(1)(3)(7)(4)(2)(7)(6)(6)(14)(15)(23)(16)(12)(15)(14)(11)(6)(6)(4)(5)(6)(8)(11)(3)(4)(10)(12)(3)(6)(6)(1)(5)(1)(16)(7)(6)(1)(6)(1)(5)(11)(2)(1)(5)(7)(2)(7)(9)(11)(9)(5)(12)(18)(18)(21)(25)(30)(35)(20)(28)(31)(32)(30)(39)(85)(40)(34)(15)(15)(3)(3)(1)(4)(2)(4)
阅读:89346
文章:13篇
阅读:21972
文章:53篇
阅读:466381
文章:10篇
阅读:59309
文章:57篇
阅读:391832
文章:45篇
阅读:86641语音用英文怎么说?_百度知道
语音用英文怎么说?
英[fəˈnetɪks]
美[fəˈnɛtɪks]
语音学; 语音(学); 发音学;
[例句]Every day the teacher would teach him letters and phonetics as well as one sentence.老师每天除了从字母和音标教起,还会教他一句口语。My other favorite feature of jelly bean is speech recognition.糖豆另一个我最喜欢的功能是语音识别。The tablet will also have a five megapixel camera and a microphone to take dictation.这款平板电脑还将配有一个500万像素的摄像头和一个用于语音输入的麦克风。
其他类似问题
5人觉得有用
为您推荐:
音1.voice recognition语音邮件1.phonetik und sprechkunde语音识别1.phonetics2.voice3.phone4.VOICE ANNOUNCE语音学1.voice prompt2.intonation语音提示1.speech2.speech recognition2.voice mail2
我学的科目有语言学,纯英的,语音学是phonetics,包括发音语音学,听觉语音学和声学语音学
voice conversation
sound speech voice
Voice Chatting
您可能关注的推广
英文的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁voice-recognition software - 必应 词典网络语音识别软件1.语音识别软件微软语音识别API,Microsoft Speech... ... ) MCSR 微软连续语音识别引擎 ) voice-recognition software 语音识别软件 ... |例句释义:全部,语音识别软件类别:全部,口语,书面语,标题,技术来源:全部,字典,网络难度:全部,简单,中等,难更多例句筛选收起例句筛选1.
picked up the 's
- 4.Stenographers
deal with 6. the
but was novel 8.Autonomous units use -
children9.VoicePay as
VoiceVault10. of
little 必应词典应用准确权威无广告下 载 手 机 版 必 应 词 典体 验 P C 版 必 应 词 典© 2016 Microsoft

我要回帖

更多关于 voice recognition 的文章

 

随机推荐