Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this lab, we would like to explore the ways to use speech recognition and text-to-speech features in Android. The UI has been designed by

In this lab, we would like to explore the ways to use speech recognition and text-to-speech features in Android. The UI has been designed by the pre-defined XML file.

To access the documents and APK file, please see the Google Drive: https://drive.google.com/open?id=1E-qTsqrSkYIWYt9CDdaR31AZmQlC0XaXimage text in transcribed

image text in transcribed

Layout - activity_main.xml (for your reference)

xml version="1.0" encoding="utf-8"?> LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="10dp"

android:paddingRight="10dp" android:gravity="top" android:orientation="vertical" android:background="#000000">

TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:textColor="#ffffff" android:textSize="16sp" android:text="@string/help" />

Button android:id="@+id/ButtonRecord" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:onClick="recordSpeech" android:text="@string/button_record" android:textColor="#ffffff" android:background="#4d4d4d" />

TextView android:id="@+id/TextSaid" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:lines="5" android:text="@string/recorded_text" android:textSize="18sp" android:textColor="#ffffff"/>

Button android:id="@+id/ButtonRead" android:layout_width="fill_parent" android:layout_height="wrap_content" android:enabled="false" android:onClick="readText" android:text="@string/button_read" android:textColor="#ffffff" android:background="#4d4d4d" />

TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:gravity="center_horizontal" android:textSize="16sp" android:textColor="#ffffff" android:text="@string/try_help"/>

EditText android:id="@+id/editTextField" android:layout_width="fill_parent" android:layout_height="40dp" android:layout_marginTop="10dp" android:inputType="textCapSentences" android:background="#ffffff"/>

LinearLayout>

image text in transcribed

To access the documents and APK file, please see the Google Drive: https://drive.google.com/open?id=1E-qTsqrSkYIWYt9CDdaR31AZmQlC0XaX

.d 86% 9:26 PM button to read text with Text-To Speech (TTS) RECORD SPEECH computer science at Wentworth Institute READ TEXT ALOUD Try speech button on Android keyboard The On 1 2 3 45 678 90 A S DFGHJK L Eisu) Done Figure 3: Click EditText input field and press microphone icon to input text via speech 86%09:27 PM 86% 9:27 PM button to read text with Text-To-Speech (TTS). Lab_MyVoiceAssistant RECORD SPEECH Press the Record Speech button to translate speech to text. Press the Read Text Aloud button to read text with Text-To-Speech (TTS computer science at Wentworth Institute of Technology RECORD SPEECH READ TEXT ALOUD computer science at Wentworth Institute Try speech button on Android keyboard am a progra READ TEXT ALOUD 1 2 3 4 5 67890 Try speech button on Android keyboard q w erty o p am a programmer a s d f The Area to display text from speech Sym English(Us) Done Figure 5: Finished display Figure 4: Display recognized speech content .d 86% 9:26 PM button to read text with Text-To Speech (TTS) RECORD SPEECH computer science at Wentworth Institute READ TEXT ALOUD Try speech button on Android keyboard The On 1 2 3 45 678 90 A S DFGHJK L Eisu) Done Figure 3: Click EditText input field and press microphone icon to input text via speech 86%09:27 PM 86% 9:27 PM button to read text with Text-To-Speech (TTS). Lab_MyVoiceAssistant RECORD SPEECH Press the Record Speech button to translate speech to text. Press the Read Text Aloud button to read text with Text-To-Speech (TTS computer science at Wentworth Institute of Technology RECORD SPEECH READ TEXT ALOUD computer science at Wentworth Institute Try speech button on Android keyboard am a progra READ TEXT ALOUD 1 2 3 4 5 67890 Try speech button on Android keyboard q w erty o p am a programmer a s d f The Area to display text from speech Sym English(Us) Done Figure 5: Finished display Figure 4: Display recognized speech content

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions