Mudit Aman Hindi Voice Search:Main Page
From ACT4D Project Wiki
Spoken queries are natural medium of searching the Web in settings where typing on a keyboard is not practical. This report describes our attempts to implement Hindi Voice Web Search service for Android based phones. Previous attempts at english voice web search apps such as Google Voice App and VLingo have been proven to be very successful. These applications provide different features like the google voice app specializes in web serach while Vlingo performs different functions like contact search, voice dialling and web search. In this report, we discuss various options for developing such a service for hindi launguage.In this report, we discuss various options for developing such a service for hindi launguage. In this report we present the high level initial design with significant details of implementation of the system which can be used to address the problem.
Demo Instruction Set
In this chapter, we will guide you through setting up this system step by step.
Project Software and hardware Requirements
- Eclipse IDE with JDK 1.6 or above for developing Application end with Android 2.2 SDK
- Netbeans IDE with JDK 1.6 or above and Apache Tomcat 6.0 for Server end
- Shrutlekhan-RajBhasha version 1.1 developed by CDAC
- Aux Cable - Audio Extension cable (3.5mm)
Installation steps for Shrutlekhan
- The software is acquired by buying the commercial software from CDAC.
- Follow the Instructions mentioned in the CD for installing the software. It is compatible with Windows operating systems only.
- Check Installation of Shrutlekhan by actually testing it using head-phone and microphone jack and ensure that it is in working state.
Demo Instruction Set for building application
- Install the Application via Eclipse Galileo and Android SDK 2.2.
- Initiate Server on Netbeans 6.0 IDE on a separate machine capable of running Apache Tomcat 6.0 server and connected to network.
- Configure the application with the IP of the server set up. If you have DNS listing of the server, enter the domain name in the appropriate text box.
- Follow the application GUI for any audio or text input to perform web search.
- HelloAndroid.java: This is the main file where the application is controlled and run by. The application is initiated and the user interface is described here. The user can input text queries for web search in the text box or tap the start button for audio queries. This file listens for any input, records audio via AudioRecorder.java, creates a connection to the server IP and uploads the audio file (function uploadaudio). It then reads back any text result from the server(readback), performs post processing on the text result(postprocess) and passes the URL to the websearch class. It then listens for any feedback from the user and sends the same to the server for database storage.
- AudioRecorder.java: This script is used for audio recording in desired format (WAV in our case) and sample rate. It uses already provided libraries of android operating system.
- Websearch.java: This piece of code takes a URL and opens a link to it in a browser window inside the application itself.
- NewServlet.java: This is the main servlet code which runs on Apache Tomcat server. It listens for connections with POST method. First of all, It receives User ID
of the application using Android ID which is unique for every android phone. Then, It receives the audio file in byte code format and write the data in a WAV file. Then, it acquires the lock for synchronization. It clears the Shrutlekhan screen. Then it plays the WAV file which was received. Then after the file is played, It captures the text from the Shrutlekhan window and copies to the clipboard. Then it runs TextTransfer.java to get the content from clipboard. It changes the content to unicode. It then looks up the text in the feedback file, If it finds a mapping for that user, it returns the mapped text, otherwise it returns the original text.
- TextTransfer.java: This code is responsible for fetching the text content from clipboard to the java servlet. It uses Java Clipboard API’s to get the contents.
- GetText.java: This code is responsible for running Java Robot API’s. It has a function clean, which clears the contents of the text area. It has a function test,
which is cuts the text from the text area and copies it to the clipboard.
- AeWavePlayer.java: This file plays the Audio File (.wav file format) on the server which acts as input for the Shrutlekhan Software.
- feedback.java: This is a feedback servlet code which listens for feedback from applications when users give new feedback. This servlet runs on the same server as the