2017년 7월 19일 수요일

search results for RECOGNIZE_SPEECH


It appears that speech recognition is not supported... See this blog: https://forums. developer.amazon.com/forums/thread.jspa?threadID=1174. ---. Scott.
Hi I want to run an app with speech recognizer in the emulator but it reports the following runtime error: No Activity found to handle Intent ...
I am having a problem with speech to text in a very simple app. The app works fine in an old Droid phone but returns the following error message in a ...
This is what the Google API says ( found in this link http://developer.android.com/ reference/android/speech/RecognizerIntent.html ) ...
Hello. I have a problem with the SpeechRecognizer. When I click the Button then a Speechrecognizer must be called but I get the error message ...
Using SpeechRecognizer in emulator results in a runtime error: No Activity found to handle Intent {act=android.speech.action.RECOGNIZE_SPEECH ...
@Shivendra I do not know what the issue is on your Samsung Galaxy J7 Prime. Here are some things you might do to get it to run on your device.
because i have the same error in the case of the Emulator. if you take a look at the already mentioned threads ...
This is the search URL for your error in this board .
Hi,. I have used Speech Recognizer with my SMS messaging app on my phone for over a year with good results. This has changed in the last month.
When I call for the Speech Recognizer to "get text", the message "No Activity found to handle Intent { act=android.speech.action.


Trainers/TA in Seoul to help on July 24 for Global Issues Forum @ Gimpo, South K


Dear all, this is Ernie from Code for Asia Society Ltd. (http://codefor.asia) based in Singapore which aims to make coding inclusive. We are looking for Lead Trainer/Co-Trainers who can help on a pro bono basis from 2-6pm on 24 July. It is for a local school that is running a "Global Issues Forum" which is a week of students researching and discussing global issues to come up with their own solutions to it and Code for Asia is working with a local partner - Debate for All - to encourage students to learn and prototype their solutions using MIT App Inventor. 

Our goal is to encourage complete beginners to learn to code and use it as a force for good. The audience is 60 high school students, and both CfA and DfA will have on-site facilitators to support you. We will be able to reimburse relevant transport and food costs for helpers. We also have course materials that we can easily share with you (mostly based on online tutorials actually). Do let me know if you'd be keen/available to help support. You can get in touch with me directly at ernie[at]codefor.asia. Cheers. :)

--

Sir if you can organize this kind of event in India as well. If you do this then I would be very happy, you have a hearty welcome in India. If such a program is created then I must definitely tell.

--

Speech Recognizer - Talking Calculator


TalkingCalculator is the bare bones code to create a calculator you can speak to.  It will make a calculation based on what you tell it to do and provide (speak to you with) the correct answer (usually).

The code has to be run on a real device (it will not run on the emulator) because of the SpeechRecognizer object is not supported on the emulator.

'Train' the SpeechRecognizer to your voice.  Take a deep breath and say everything you want to say in a single sentence, keeping a steady cadence.  For example, say 98 point 3 times 7 point 2 equals    instead of     98.3          times         7.2         equals  .   If the app has trouble understanding, say something simple...like perhaps   10 plus 5 equals and see what happens.

TalkingCalculator understands only four Math operations at the moment.  Add as many additional operations as you want.  If you add a lot more realize soon you may be requesting more processing in the afterspeech event handler than App Inventor's asynchronous processing will allow without errors.   The Android Speech Recognizer is fairly smart but is not brilliant.  It recognizes you are working with numbers IF you start the request (ASK) with a numeral.  If you pause too long between numbers and words, it will mess up.

The app itself is presently pretty dumb, all it does is parse the spoken text into a LIST and it assume the user knows how to speak to it;  say first number, say the operator, say the second number then say equals or not (saying equals is not totally necessary but it makes it easier to say the instructions.  It has limited error control capability...If you do not provide two numbers and an operator, the app will balk.

The app  takes two values and provides a mathematical operation on them.  It places the first number mentioned in the red text box (TextBox1) and the subsequent number in the blue text box (TextBox2). It looks for a mathematical operator ( +, -, * or / ) .  These operators must be spoken as 
+ plus
-  minus or   subtract 
* times 
/ divide  or divided
. point
and equals

Other words can be used however the SR will only know the words you provide.  You cannot provide an operator like   "divided by" because this is two 'words' and the parsing separates based on spaces.  A developer can re-coded the behavior to accept a spoken "divided by" but is not done in this example.  Of course, if you are not in North America and other places where the decimal separator is a point or period ( . ) you will need to provide a comma equivalent.  You will need the equivalents of plus, minus, divide , minus in your language (or the language your Android understands).

The app runs very well on a Tablet; the SpeechRecognizer on my phone has some issues and it is necessary to occasionally repeat a request.  I expect it is because the Tablet has better hardware and cpu.   Your experience might be different.  The Google Android SR is very fussy and the coding set is limited.


--
Great fun - well done!  :)

--
Dear Steve, I'm not sure if this is relevant or if you'll be interested but I found your posts using the keywords "mit app inventor seoul" on Google so thought I'd ask if you're in Seoul and interested to help with MIT App Inventor training for high school kids at Gimpo this coming 24 July from 2-6pm?

I have made a post here: http://ai2inventor.blogspot.kr/2017/07/trainersta-in-seoul-to-help-on-july-24.html as well. Basically "I am Ernie from Code for Asia Society Ltd. (http://codefor.asia) based in Singapore which aims to make coding inclusive. We are looking for Lead Trainer/Co-Trainers who can help on a pro bono basis from 2-6pm on 24 July. It is for a local school that is running a "Global Issues Forum" which is a week of students researching and discussing global issues to come up with their own solutions to it and Code for Asia is working with a local partner - Debate for All - to encourage students to learn and prototype their solutions using MIT App Inventor. 


Our goal is to encourage complete beginners to learn to code and use it as a force for good. The audience is 60 high school students, and both CfA and DfA will have on-site facilitators to support you. We will be able to reimburse relevant transport and food costs for helpers. We also have course materials that we can easily share with you (mostly based on online tutorials actually). Do let me know if you'd be keen/available to help support. You can get in touch with me directly at ernie[at]codefor.asia. Cheers. :)"



--
When I ran this application, I received a message like this.
My phone is Samsung Galaxy J7 Prime

--
This reminds me of the old Abbott and Costello comedic routine where 
Costello is a door to door vacuum cleaner salesman in the 
country, and he dumps dust on a housewife's carpet
over her objections, claiming it will
suck up all the dust or he will eat it.

She hands him a spoon and tells him she has no electricity.

You have to find a speech recognition app for your phone
and install it.

--
@Shivendra  I do not know what the issue is on your Samsung Galaxy J7 Prime.

Here are some things you might do to get it to run on your device.  The app runs fine on most devices so it would be interesting to note what is different about your Samsung.


1) It might not use the 'standard' Google Speech Recognition engine.  This Samsung device may have its own speech recognition engine .
When you press the ASK button, do you see 
a screen something like this?   If not, TalkingCalculator is not finding the Google Speech Recognizer.


2)  If you do see that screen, do you speak in English?   and is your phone set for English or Hindi?     It's gotta be set to English.  If you do not see 
the Speech icon, then it is probably that the App Inventor 2 SR component is incompatible with that device , especially if you do not see that screen  or 
the error message appears as soon as TalkingCalculator is installed.

3) It is possible your phone does not have a TextToSpeech app enabled . The app needs a text-to-speech engine (it can be download it from Google Play).  The TTS language 
and your device language have to be the same.  The lack of a TTS could be the reason  the error message does indicate 
RECOGNIZE_SPEECH, not Speech Recognizer. The presence of the TTS could be the issue.   You could delete the TTS component.  The TTS is used to have the device speak the math answer. 

and delete the two occurrences of this block , rerun the modified code and try again.


Alternatively you could  download Google's Text to Speech engine from the Playstore (because it might not be installed on your device).



4)Something else is causing issues.  In the aia, the Screen Sizing is set to Fixed ... perhaps change that to Responsive.   That should not be an issue but it might
be a contributing factor.

Is any of this helpful?    Did you get TalkingCalculator running?

--
I carefully checked your phone and found that my phone is already Google's Text to Speech engine and it is working properly in Google translator.
And one thing I noticed is that no request has been received from all the applications in the application of the camera to do it, microphone use, etc.
But this application has not asked for any permissions.

--

create more than 1 text file using Speech Recognizer


How to create more than 1 text file using Speech Recognizer ?
That is, there is an arrangement to add more files to it.
for example-
File name 1: abcd
File name 2: efgh
.
.
.
File name n: xxxxx

And these files are stored in memory card pdf format or notepad format.
I hope you guys will definitely help me in making this application.

--
There is a Speech block that returns you the text.
Drop it into a global incoming_text variable (for debugging),
and split it at "save file" using the text split block.

The number of list items will tell you if you included 
the words "save file" with a file name.

If just 1 item, the user isn't finished speeking yet, 
so JOIN it onto the end of another global,
all_text, initially blank.

If 2 items, then item 2 must be the file name (I hope)
so JOIN the text onto the end of all_text and
write all_text out to file name (select item 2 of the list) JOINed with ".txt"
then clear all_text.

Ask for more text.

--
I forgot to mention, keep a TinyDB entry tag=FILES with
an initially empty list of all the file names that were used
to save text, to help finding them later.

When  writing a new file, retrieve FILES, add the new name to it, and 
save it back to TinyDB tag FILES.

--
If you give any example .aia, then I will also understand.

--
I suggest to start with this Gallery app and then add file capabilities to it once you understand it.

The screen notes is the one that accepts speech.

--
Also see this recent post for an example of one way to parse speech input Speech Recognizer - Talking Calculator
and act on the results.

--
This application is not in English, I only know English and Hindi. This is in any other language.
So I do not understand it completely

--
These applications do not work properly, so I do not understand its function on my phone

--


I understood the code for making a list manually and made it work properly. Now I want to make it with Speech Recognizer but I am not able to succeed, please, please, let me see the right way

--
This is the search URL for your error in this board ... search results for RECOGNIZE_SPEECH

That's the place to look for other people who had your error and what happened for them.

I see three patterns ...

Some people tried to do speech recognition in the Emulator, which does not support it.

Other people were running Samsung Galaxy phones.

Also, some of the people had multiple language support turned on.

You might find more similarities in your reading.

So far, it looks like you need a different device or need 
to play with your device's language settings.
You might find better help in the search results.

Here is a super simple speech recognition sample
from the Gallery, for your device testing.

--

How to get only the slider's FINAL position after sliding


I want to use the slider as volume control, the volume will be sent to the ESP8266 WiFi module. But when I use the PositionChanged block, it triggers continuously as the slider is slid from point A to B and thus sends thousands of volume commands to the ESP8266!! Resulting in it overloading and crashing (Like a DOS Attack!). How do I get only the final position of the slider thumb after it is moved and released? Is it possible to implement some sort of procedure which checks if the slider thumb is held or not? as this can be used to detect when it is released and send the command of the volume at the time, thus only the final volume! I have been stuck with this for a while, please help ASAP.

--
Try this:

Set Min Value to 0,set Max Value to 11 ;)

Add a round block (from Maths) before thumbPosition

This will then only send values incremented by 1

There is probably a clever way of capturing all the values in a list, then fetching the last value in the list

--
Alternatively, drop the slider, and just use two buttons and some logic to increase and decrease a variable by 1 then pass this?

--
There is no Slider property or method to ensure only the final position is reported   http://ai2.appinventor.mit.edu/reference/components/userinterface.html#Slider  

You might use the slider in conjunction with a Button where the Button.Click event handler contains:

code to send   Slider1.ThumbPosition.

Also, you might use a Clock.Timer   with the Interval set to perhaps 1000ms (1 sec)

In the slider PositionChanged

Set Timer1.enabled to true 

and in the Clock.Timer  
??? the code you send to your ESP8266! ?? set to  Slider1.ThumbPosition

or one of the other methods mentioned previously by Tim.

--
Had another go, used a clock (every 500msec)  to check the last item in a list from thumbPosition
--
It only takes a moment to build your own slider from a thin Canvas
and a TouchUp event, drawing a thick line from the left edge to
the TouchUp x value over the freshly Cleared Canvas.

Drop the ratio of the TouchUp x value to the Canvas Width into a global
variable in the TouchUp event.

Rescale that ratio to whatever units range you need by multiplication.

--
Using a timer to send the value every x seconds will cause unnecessary processing and memory to facilitate the volume, as this will happen even when there is no change in volume... Besides there are other events that need to be handled as well and this will interrupt them... I want to implement a canvas and an imagesprite as it has a when dragged block and also a when touched block with which implementing this will be easier... But since I'm new to app inventor and have never used canvas or imagesprite I need some help with how to draw the slider on the canvas and move an imagesprite on it etc...

--
Yes, I thought about that after my last post (as I drifted off to sleep!)

A simple if/then test would only send the signal (change label text in my example) if the value from the thumbPosition is different from the label value.

In your app you would need to set a variable with the last value and test that against thumbPosition.
--
For the line drawing blocks, see this Gallery project ...

The slider in that progress was used only to supply input 
to test the line drawing on the canvas.

Your problem is how to invert the control flow, and eliminate
the slider entirely.

You don't need a sprite for this.
The Canvas itself has a touch Up event and a drag event.
You can redraw the line during the drag, but only 
send the results from the Touch Up event.

--
See this Gallery sample ...

For the impatient, see attached.




--
The app you sent is very very similar to what I'm trying to achieve but since it is a user interface, I need to use an image for a 'dragable thumb' which moves to the coordinate where touchup is detected... I used a sprite for inserting an image of a circular control button for the 'dragable thumb' and drew a nice slider that has curved ends within the screen of the device... But Since the image is suppose to be circular, the image sprite forms a white box around the circular button which makes it look as if it is another picture that is just put on the slider and not connected to the slider... How do you have a circular sprite so that the colour of the slider looks curved around the button without the button having white bounds? (This may become more clear and understandable when you see the image attached, which shows the visual problem)
--
I personally avoid the aggravation of sprite graphic sizing by using
appropriately sized Balls.  

I am told that the .png graphic format allows transparent background.
I haven't tried that.

Maybe one of the Ai2 users more advanced in graphics can help here?

--
Yes, like Abraham said, you need to use an image of a round thumb in png format, not jpg.
Do a Google search for "slider thumb png" and you will find some that have the transparent cornes.

--

Timer countdown wont stop


Maybe anyone can help....my countdown timer wont stop after reach 0,0,0 and wont play sound, the timer automatically start a new countdown, any solution for this?

--
probably 

if numberofseconds <= 0
then end

--
still not work when i change ibltimeleft.text <=0

--
Why not check if global milliseconds is less than 1000

--
still not work when i change ibltimeleft.text <=0

I suggested the following, which is something else...

  if numberofseconds <= 0
  then end

--
Thank you for have respond my question Mr. Djsedaw and Mr. Taifun but forgive my level is just beginner so i still confused how to write and put the code of numberofsecond cos i have look at my component there is no numberofsecond, if you don't mind i need more explaining where i can get n where i must put that component.....forgive me for my ignorance  

--
--
Would you be able to post your aia file?

--
Thank a lot Mr. Djsedaw for your concern, i am just trying to make a program that when time reached then the program stop count and then play the sound


--
Thank a lot for your help Mr. Taifun

--
I have only changed you blocks slightly, there is now a global start hour and min variable to set the start time to go to, and have changed the check if time is up by keeping it simple and just checking if hour, min and sec are zero, hope this is of use, also your happy birthday mp3  seem to play forever but i will let you sort that one out.



--
Thank a lot Mr. Djsedaw its work he3......so if i want to change the time i just change the value of start minute or start hour.
 but i still got one problem how to make a countdown keep on running even the application close perhaps you have the answer 

--
Hi Riko, there are a few ways of doing this if you have a search, the method I use (thank you who ever found it) is

load this mp3 file one_second_silence.mp3

set it as below on player2
Set up the block below and call true to turn  it on, false  to turn it off
one_second_silence.mp3

--
sorry where i can get call wake lock code?

-- 
sorry where i can get call wake lock code?

alternatively you might want to use the KeepScreenOn method from the tools extension

--
Thank a lot for your advice i will consider it

--
I would Google app inventor procedures, you create the procedure and call it wakelock (or whatever you like). If you are still stuck after googleing I will help.

--
ok thank you for your advice i will try googling first and i will ask again if im still got the same problem 

--

Search in file or in a list


I have a textfile containing "PhoneMame PhoneNumber,PhoneName2 PhoneNumber2, etc etc"
I want to retrieve Phonename with Phonenumber
What is the best way to do ?

--
if you can put your textfile to the format

"Name","Number"
"Name","Number"
"Name","Number"
"Name","Number"

you can convert it to a list


you'll get a list containing lists (2 Items)  for every Name,Number 

will show you the TelNumber (index2, Name would be index 1)  of the 5th line in your textfile

Then you can search you name with:


index 1 = name index 2 = number
item is the your line in the textfile containing a list of name,number (2 item list)

-- 
Thanks for your help.
I havo formated the input file in my java program with :

name1,phonenumber1
name2,phonenumber2

but, when i execute Set global TelFile to list to csv row list get text (In When File1.GotText)

I have the message The operation list to csv row cannot accept the arguments: [and the list of my entire file]

-- 
this

name1,phonenumber1
name2,phonenumber2

is a table in csv format
to convert it into a list of lists, use the list from csv table block

--
Thanks for your sample, all is workin fine !

-- 

Notifier, choosing "Cancel"


When you call the Notifier.ShowTextDialog (cancelable = true) what is the "response" in case of cancellation?
It is an event-sensitive question, as I could program something on cancellation of any input procedure in every subsequent if-else "AfterTextInput" block.

--
The response parameter in AfterTextInput event will be "Cancel" if the CANCEL button is pressed in the dialog box. 

 Please take a look at the documentation of Notifier component at:

-- 
I apologize for having missed the Cancel instructions included in documentation. Simply I did not see it.
--
you could simply try it:


it will be 'cancel' if your language is english otherwise it will be 'cancel' in your language.
in the matter of fact it is that, what is written on your 'Cancel' button.

--
I just tested the "cancel response".
Confirm (to the benefit of follow up-ers) that the answer is language-sensitive.
And I make notice to the staff that could be a problem on international basis, since the if-condition based on my italian "Annulla" would not work on devices set with different languages.


-- 

Excel


I am working on an app that is basically a scoreboard for 13 teams. 
There are 2 rounds of 30 questions. Teams get 20 points for correct answers and lose 20 points for incorrect answers. We need to see each question as correct or incorrect and we need to see a running total of points.
We already have an Excel spreadsheet that does this, but I would like to send the information to the spreadsheet using an app. Is this possible?
I did the pizza tutorial to learn how fusion tables work. It seemed possible using a fusion table, but now I'm not so sure.
Maybe if I could flip/flop the columns and rows in the fusion table?
Any ideas to steer me in the right direction?

--
Post the current spreadsheet so we can offer specific suggestions.

For an Insert-only solution, I would recommend these columns for your
Fusion Table:
  Round Number (1-2),
  Question Number (1-30),
  Team Name (chosen from a List Picker)
   Correct? (true/false)
  Points for this question (20 or -20), derived by the app

Also create a view on the table with columns
  Round (1-2),
  Team Name
  Total Points (see the Sum and Group BY features of Fusion Tables)

Use the search box on this board for "spreadsheet" for pointers to posts
showing how to use Google Sheets from AI2.

Also see thunkable.com for the other flavor of AI2, that has
enhanced spreadsheet support built in.

-- 
I started working with a Google Spreadsheet using this tutorial:
I'm starting to make progress, but I still have a few questions that I need to work out. I've attached some screenshots to help show what I'm working with.

1. I got the data to send from my tablet to the Google Form part of the spreadsheet. However, I would like the numbers to automatically add up, like I set them to do in the spreadsheet part.Can this be done?
2. Is there a way to flip-flop the columns and rows? I would like the team names to be listed as one unchanging column. I would input the data for each team for each individual question. Right now, it's working so that I have to input the data for one team for all questions. Also, the team name gets changed from Team 1 to the autostamp date/time.
3. Is there something with the Visualization API that I need to do? I never did anything with it, but the data was sent, so I didn't worry about it.


  



-- 

I would like the numbers to automatically add up, like I set them to do in the spreadsheet part.Can this be done?

you might be able to do this using Google Apps Script.


 Is there a way to flip-flop the columns and rows? I would like the team names to be listed as one unchanging column. I would input the data for each team for each individual question.

you could have 2 sheets, one to collect the data for each team and question and a Google Apps Script could copy the data to the second sheet and add all values

-- 
Using Thunkable.com looks like the simplest option. Looks like an excellent resource for creating apps. Thanks for sharing! I tried working with a spreadsheet in CloudstitchDB - that seems to be the way to connect it to the app created on thunkable. I'm having a hard time making it work, though. I can't seem to see my spreadsheet on CloudstitchDB and I can't find any help on the website. Any tutorials or guides that you know of to help me out?

-- 

Using Thunkable.com looks like the simplest option. Looks like an excellent resource for creating apps. Thanks for sharing! I tried working with a spreadsheet in CloudstitchDB - that seems to be the way to connect it to the app created on thunkable. I'm having a hard time making it work, though. I can't seem to see my spreadsheet on CloudstitchDB and I can't find any help on the website. Any tutorials or guides that you know of to help me out?

-- 
Regarding Cloudstitch and Thunkable, check their site for their help board.
That would be a more directly targetted area of experts in this.

Let us know how it works out for you?

--