top of page

Voice-Recognition

  • 작성자 사진: Shin Yoonah, Yoonah
    Shin Yoonah, Yoonah
  • 2022년 7월 25일
  • 1분 분량

최종 수정일: 2022년 8월 11일

Plan: Deaf people cannot know what obstacles are in front of them and the exact location of the corner. In addition, I'm expecting to develop an app that voice-support how many meters away a destination is located in a radius to reduce the probability of an accident based on the case that GPS cannot precisely track their location because of nearby obstructions or when people are inside of the building and the location error caused by the accuracy of nearby BTS (Base transceiver station)


Before I start coding, I had to study how android app works

This is called "Android life cycle". As you can see in the picture, this is how the activity (the screen that appears) starts and ends.

This "Android life cycle" works until you shut down the application.


Then, this is a time to start to develop my app!!


MainActivity class


First of all, I accessed speech and listener recognition function provided in android library

SpeechRecognizer: Library for delivering voice recognition on Android

VoiceRecognitionListener: Listener class for delivering converted text after speech recognition

Intent: Class for Configuring Speech Recognition Library


Second, to check the permission is granted or not, if not, code for requesting


Third, I set the settings that will be provided in "onCreate" section

  1. Check the permission of audio

  2. Create instance of Listener and recognizer lister

  3. Set intent for the preference


Fourth, Code for textview control UI and start speechRecognizer in "onClick" section


VoiceRecognitionListener class


Append the string value after finish voice-recognition



Let's see how voice-recognition works!!!


Comments


bottom of page