0% found this document useful (0 votes)
8 views14 pages

Session 4

The document outlines the creation of a voice-activated calculator mobile application using components like SpeechRecognizer and TextToSpeech. It details the use of condition statements, including if-then and else statements, to process user input. Additionally, it introduces a homework assignment to develop an application that spells words using text boxes and text-to-speech functionality.

Uploaded by

Eman Helal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views14 pages

Session 4

The document outlines the creation of a voice-activated calculator mobile application using components like SpeechRecognizer and TextToSpeech. It details the use of condition statements, including if-then and else statements, to process user input. Additionally, it introduces a homework assignment to develop an application that spells words using text boxes and text-to-speech functionality.

Uploaded by

Eman Helal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mobile Application

Session 4
Application 3

Make a calculator
using your voice

All rights reserved


1
Condition statements

All rights reserved


2
If then statements

All rights reserved


3
Else statements

All rights reserved


4
Component used

5
All rights reserved
Use a SpeechRecognizer component to listen to
the user speaking and convert the spoken sound
into text using the device’s speech recognition
feature.

All rights reserved


6
The TextToSpeech component speaks a given
text aloud. You can set the pitch and the rate of
speech.

All rights reserved


7
Block used

AfterGettingText(result,partial)
Simple event to raise after the SpeechRecognizer has recognized speech.
If UseLegacy is true, then this event will only happen once at the very end of the recognition.
If UseLegacy is false, then this event will run multiple times as
the SpeechRecognizer incrementally recognizes speech.

All rights reserved


8
Block used

Asks the user to speak, and converts the speech to text.

Appends all of the inputs to make a single string.

Divides the given text at any occurrence of a space, producing a


list of the pieces.

All rights reserved


9
Block used

Selects the item at the given index in the given list. The first list
item is at index 1.

Speaks the given message.

10
All rights reserved
Session Blocks

11
All rights reserved
Session Blocks

12
All rights reserved
H.W

Application 4

Make an application to spell


the word Using :
1- text Boxs
2- text to speech

13
All rights reserved

You might also like