February 16th, 2011, 06:18 AM
|
#3 (permalink)
|
|
New Member
Join Date: Feb 2011
Posts: 2
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
|
Quote:
Originally Posted by bibinours
Hello,
I'm using android emulator (SDK 2.2) with Eclipse and I tried to do
work the sample VoiceRecognition.java but it returns to me this
message "Recognizer not present". What's the matter? I read on
different forums "a problem with the initial system image", should I
upgrade system image or there is nothing to do with this?
I have another problem, I would like to use an wav or mp3 like input
of my speech recognizer (instead of audio record with microphone), how
to do this? is it possible or not?
Thank you.
|
The voicerecognizer needs an app to run it, in this case I used the Google Voice Search.
@vivekcr
you should adjust your main.xml in your res.layout
like this:
Code:
<? xmlversion="1.0"encoding="utf-8"?>
<!--
* Copyright (C) 2008 Google Inc.
*
* 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 copy 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.
--> <!-- This activity displays UI for launching voice recognition --> < LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingBottom="4dip"
android:text="Voice Commander"/>
<Buttonandroid:id="@+id/btn_speak"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="speak"/>
<ListViewandroid:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="1"android:id="@+id/list"/>
</LinearLayout>
and also in your voicerecog class,
Change
" setContentView(R.layout.voice_recognition);"
to
"setContentView(R.layout.main);"
this was the main reason why my voice recogn didnt work.
|
|
|
Last edited by shinmeiryu; February 16th, 2011 at 06:27 AM.
Reason: no double posting
|
|