USER GUIDE FOR TWO MICROPHONE DIRECTION OF ARRIVAL ESTIMATION ON ANDROID SMARTPHONE FOR HEARING AID APPLICATIONS

Similar documents
USER GUIDE FOR TWO MICROPHONE DIRECTION OF ARRIVAL ESTIMATION ON ANDROID SMARTPHONE FOR HEARING AID APPLICATIONS

USER GUIDE FOR SMARTPHONE BASED REAL-TIME ACOUSTIC FEEDBACK CANCELLATION SYSTEM

USER GUIDE FOR INFLUENCE OF MVDR BEAMFORMER ON SPEECH ENHANCEMENT ON ANDROID SMARTPHONE FOR HEARING AID APPLICATIONS

USER GUIDE FOR PREDICTION ERROR METHOD OF ADAPTIVE FEEDBACK CANCELLER ON ios PLATFORM FOR HEARING AID APPLICATIONS

User s Guide: A Noise Classifier Smartphone App for Hearing Improvement Studies

ENHANCEMENT IMPLEMENTATION ON

User s Guide: An Unsupervised Noise Classifier Smartphone App for Hearing Improvement Studies

User s Guide: How to Use Two External Microphones in Smartphone Apps for Hearing Improvement Studies

Choose OS and click on it

Tutorial on OpenCV for Android Setup

Participant Guide. General Recommendations. USB Headset. Sec. That is the only on-campus

Tutorial on Basic Android Setup

Adobe Connect Student Guide

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Software Development Kit for ios and Android

Tutorial on OpenCV for Android Setup

Android: Call C Functions with the Native Development Kit (NDK)

Basic Android Setup for Machine Vision Fall 2015

A113X1 Development Kit

Camera TEIA USER GUIDE

Getting Started with Adobe Connect

MIKE di Y gital USER GUIDE

Introduction. See page #6 for device requirements.

USB Recorder User Guide

Android Studio is google's official IDE(Integrated Development Environment) for Android Developers.

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

SONiX TECHNOLOGY CO.,LTD.

Htc Incredible Software Update Won't Install

Steps to Set Up the Environment of Xamarin in Visual

Google Maps Troubleshooting

Install ADB on Windows

Z Series. Project Design Guide

Hip Smarthome - Systems User Manual

BlackVue C App Manual

Introduction. Built-in speaker. Infrared lights. Camera lens. Reset button. Indicator light. Micro- USB port for power supply.

Ideal for Collaboration Share Content Wirelessly Moderated Presentation Share Content across Multiple Displays Enables a Secure Connection

WebEx. Web Conferencing Tool. Fordham IT

How To Manually Turn Off Display Windows 7

Preparing Rapise for Android Mobile Testing. Testing Architectures. Installation Notes

QUICK START GUIDE. QC IP Camera & NVR Bundle ENGLISH

User S Guide Android Technology Platform

Features: (no need for QR Code)

LiveMIC2. Bluetooth Wireless Microphone P/N AMLVM5C2XXX USER GUIDE

Instructions for SimplicityTouch ST-700 Gen 3 TECHNICAL TRAINING GUIDE

For Organizers (Hosts) at OSU

RMIT University - AV Test Script (Standard AV)

Quick Guide. Light Sensor. Focus Adjustment Ring. Infrared LED (IR Model) PIR Sensor (PIR Model) Micro SD Card Slot. Speaker

Room 4 User Guide. Version 1.0

AV Guide for 2306 McGavran-Greenberg

Welcome Installation Authorization The T-Pain Engine: Quick Start Interface Sound Check... 10

Help Guide. Getting Started. Making connections. The following explains how to use this speaker. Select a topic from the navigation pane.

Wireless IP Bird Box Camera


DEVELOPERS MANUAL. Philip SUPER HAPPY FUN FUN INC Research Blvd. Suite C-220 Austin, TX, 78759

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Iconia One 10 [B3-A20] PRODUCT BRIEF VERSION 1.2, AUG

GoREACT Student FAQs. Other Software and Hardware Needs. Systems Support Yes No

Quickstart Guide (English)

NS15WG 1080P Web App User Manual

Samsung Galaxy S3 Headphones Not Working (volume Control Buttons)

HD Ovi Digital Clock WiFi Hidden Camera. User s Guide WHEN YOU NEED TO KNOW.

AV Guide for Mayes Center (232 Rosenau Hall)

Qt for Device Creation

The office for the anywhere worker!!! Your LCB SOFTPHONE: A powerful new take on the all-in-one for a more immersive experience.

Display. 2-Line VA LCD Display. 2-Zone Variable-Color Illumination

Spontania User Setup Guide

WELCOME Mobile Applications Testing. Copyright

Super UA Q&A 2015/03/16

Instructions How To Use Kindle Fire Hd Camera

WELCOME Mobile Applications Testing. Copyright

Getting Started Guide. Version January 4, 2015

Android Jelly Bean Manual Install On Pc In 10

402 Back to School: Quickly Create Effective Whiteboard Videos

SignalMaster Manual Version PN: M072005

Installation Instructions

Luma Surveillance Mobile App. Owner s Guide. Version

Welcome To VIRTUAL WITHOUT THE VIRTUAL TM. imvp Setup Guide for Mac. imvp Classroom and IBM RDP Lab Setup Guide For Mac 1

COLLEGE OF ENGINEERING, NASHIK-4

Grandstream Networks, Inc.

CommCare for Android Smartphones

GoREACT Instructor FAQs

What is Adobe Connect Pro? Setting up a Meeting. Using Adobe Connect Pro

Gesture Recognition and Voice Synthesis using Intel Real Sense

Faust Android API. Using This Package

Android Studio for Windows

Minds-on: Android. Session 1

PJP-50USB. Conference Microphone Speaker. User s Manual MIC MUTE VOL 3 CLEAR STANDBY ENTER MENU

QUICK START GUIDE QT IP CAMERA & NVR BUNDLE ENGLISH

Installation Instructions

TABLE OF CONTENTS. 7 Chat Files Attendees Questions Settings... 18

CMA BROWSER. User guide. The private use of Telia s Visual Communications on a computer, smart device and browser

RECORDING WITH CAMTASIA 9

PRELIMINARY MEETING PREPARATION For the best quality and experience during your WebEx Meeting, you should have the following:

ARVi Operation Guide. Brought to you by:

Cadrage Director s Viewfinder USER MANUAL

The world of BAOS. Easy connectivity for KNX with Bus Access and Object Server. Overview and applications

Portable Digital Video Recorder

ROCKBOX CURVE Full manual

Q.bo Webi User s Guide

Cassia Hub Bluetooth Router. ios & ANDROID APPLICATION GUIDE

Transcription:

Page 1 of 14 USER GUIDE FOR TWO MICROPHONE DIRECTION OF ARRIVAL ESTIMATION ON ANDROID SMARTPHONE FOR HEARING AID APPLICATIONS Anshuman Ganguly, Abdullah Kucuk, Yiya Hao STATISTICAL SIGNAL PROCESSING LABORATORY (SSPRL) UNIVERSITY OF TEXAS AT DALLAS MAY 2017 This work was supported by the National Institute of the Deafness and Other Communication Disorders (NIDCD) of the National Institutes of Health (NIH) under the award number 1R01DC015430-01. The content is solely the responsibility of the authors and does not necessarily represent the official views of the NIH.

Page 2 of 14 Table of Contents INTRODUCTION... 3 1. SOFTWARE TOOLS... 4 2. BUILD AN ANDROID APP... 5 2.1 Programming Language... 5 2.2 Creating Android Apps... 5 2.3 Adding C File... 7 3. STEREO MICROPHONE ACCESS... 10 4. TWO MIC DIRECTION OF ARRIVAL (DOA) ESTIMATION APPLICATION... 12

Page 3 of 14 INTRODUCTION The Two Microphone Direction of Arrival (DOA) Estimation app is designed for estimation of the speaker direction for hearing aid users in real time direction on a graphical user interface (GUI). The application is trained to perform in noisy conditions as well. The contents of this user guide gives you the steps to implement the Two Microphone Direction of Arrival (DOA) Estimation algorithms on Android devices (that have two microphones) and the steps to be followed after installing the app on the smartphone. This app will be an open source and portable research platform for hearing improvement studies. This user guide covers the software tools required for implementing the algorithm, how to run C codes on Android devices and usage of other tools that are quite helpful in creating audio apps for audio playback in real time. The MATLAB and C codes used for the Two Microphone Direction of Arrival (DOA) Estimation algorithm are made available publicly on the following website: http://www.utdallas.edu/ssprl/hearing-aid-project/. The codes can be accessed and used with proper consent of the author for further improvements in research activities related to hearing aids. The screenshot of the first look of our app is as shown in Figure 1. Figure 1.

Page 4 of 14 1. SOFTWARE TOOLS Android is an open-source operating system developed by Google for mobile phones and tablets. The Android apps are usually coded in Java. In this section, it is shown how to set up the Android Studio IDE (Integrated Development Environment) for developing Android apps. Android Studio IDE requires either Windows Operating System or Apple Operating System. Android Studio IDE can directly build and upload source codes into Android smartphone or generate a APK file which can be downloaded and installed on the Android smartphone. To download the latest version of Android Studio 1. Open the Android Studio website to download. (https://developer.android.com/studio/index.html) 2. Click Download Android Studio Button (Figure 2). 3. Install the execution file after download. Figure 2

Page 5 of 14 2. BUILD AN ANDROID APP 2.1 Programming Language For creating Android apps, Java is used to create the required shell. The Java Development Kit (JDK) needs to be firstly installed on your computer. This link contains the latest version of JDK: http://www.oracle.com/technetwork/java/javase/downloads/index.html 2.2 Creating Android Apps After installations of Android Studio and JDK completed, android apps can be created using Android Studio. 1. Open Android Studio. 2. Under the "Quick Start" menu, select "Start a new Android Studio project." (Figure 3) 3. On the "Create New Project" window that opens, name your project "HelloWorld".(Figure 4) 4. If you choose to, set the company name as desired*. 5. Note where the project file location is and change it if desired. 6. Click "Next." 7. Make sure on that "Phone and Tablet" is the only box that is checked. (Figure 4) 8. If you are planning to test the app on your phone, make sure the minimum SDK is below your phone's operating system level. 9. Click "Next." 10. Select "Blank Activity." (Figure 4) 11. Click "Next." 12. Leave all of the Activity name fields as they are. (Figure 4) 13. Click "Finish."

Page 6 of 14 Figure 3 Figure 4

Page 7 of 14 2.3 Adding C File Android apps are typically written in Java, with its elegant object-oriented design. However, at times, you need to overcome the limitations of Java, such as memory management and performance, by programming directly into Android native interface. Android provides Native Development Kit (NDK) to support native development in C/C++, besides the Android Software Development Kit (Android SDK) which supports Java. 2.3.1 Installing the Native Development Kit (NDK) 1. Menu "Tools" > "Android" > "SDK Manager" (Figure 5) 2. Select tab "SDK Tools" 3. Check "Android NDK"[ or "NDK"] if it is not checked 4. Sync and re-build the project. Figure 5

Page 8 of 14 2.3.2 Writing a Hello-World Android NDK Program Creating a new project with support for native code is similar to creating any other Android Studio project, but there are a few additional steps: 1. In the Configure your new project section of the wizard, check the Include C++ Support checkbox. 2. Click Next. 3. Complete all other fields and the next few sections of the wizard as normal. 4. In the Customize C++ Support section of the wizard, you can customize your project with the following options: o o o C++ Standard: use the drop-down list to select which standardization of C++ you want to use. Selecting Toolchain Default uses the default CMake setting. Exceptions Support: check this box if you want to enable support for C++ exception handling. If enabled, Android Studio adds the -fexceptionsflag to cppflags in your module-level build.gradle file, which Gradle passes to CMake. Runtime Type Information Support: check this box if you want support for RTTI. If enabled, Android Studio adds the -frtti flag to cppflags in your modulelevel build.gradle file, which Gradle passes to CMake. 5. Click Finish. After Android Studio finishes creating your new project, open the Project pane from the left side of the IDE and select the Android view. As shown in figure 6, Android Studio adds the cpp and External Build Files groups:

Page 9 of 14 Figure 6 1. The cpp group is where you can find all the native source files, headers, and prebuilt libraries that are a part of your project. For new projects, Android Studio creates a sample C++ source file, native-lib.cpp, and places it in the src/main/cpp/ directory of your app module. This sample code provides a simple C++ function, stringfromjni(), that returns the string Hello from C++. 2. The External Build Files group is where you can find build scripts for CMake or ndk-build. Similar to how build.gradle files tell Gradle how to build your app, CMake and ndk-build require a build script to know how to build your native library. For new projects, Android Studio creates a CMake build script, CMakeLists.txt, and places it in your module s root directory.

Page 10 of 14 3. STEREO MICROPHONE ACCESS The Nexus 6 has three microphones (Figure 7). The main microphone sits behind the lower speaker grille. The other two have their ports open toward the back of the phone, i.e. one of them near the USB port and the other one near the camera lens. For camcorder recordings, the Nexus 6 uses the front microphone by default. Mic 1 (Back) Mic 3 (Front) Mic 2 (Back) Figure 7 In order to access the two microphones (Mic 2 and 3) at the same time, we need to modify the system files, also called Rooting. Rooting is a process that allows you to attain root access to the Android operating system code (the equivalent term for Apple devices is jailbreaking). It gives you privileges to modify the software code on the device or install other software that the manufacturer would not normally allow. It means you have root access to your device that is, it can run the sudo command, and has enhanced privileges allowing it to run apps like Wireless Tether or SetCPU. You can root either by installing the Superuser application or by flashing a custom ROM that includes root access. Here are some more details: http://www.androidcentral.com/root. After rooting the phone, following are the steps for stereo microphone access: 1. This mod changes two system files, i.e. /system/etc/media_profiles.xml and /system/etc/mixer_paths.xml. 2. While the changes in media_profiles.xml simply enable two-channel processing, the more interesting changes occur in mixer_paths.xml.

Page 11 of 14 3. After some experimentation, we have found that the microphone close to the USB port is associated with ADC1 (channel one of the analog-to-digital converter in the audio codec), the microphone close to the rear camera is associated with ADC4, and the main microphone is associated with ADC3. 4. The mixer file now contains a new audio device called camcorder-stereo (only called when the "camcorder" device is requested) that uses the microphone by the camera lens as the left channel and the microphone close to the USB port as the right channel. The gains are kept at stock camcorder levels, i.e. ADC1=ADC4=8. These gains are by no means set in stone. You can adjust them as you like, making the microphone more or less sensitive in the process. Indeed, you may need/want to do that when you plan on recording, say, a club visit or rock concert. 5. Keep in mind, though, that you need to reboot your phone anytime you make changes to the mixer_paths.xml file as the new values are read only upon a system boot. For more details, please refer https://forum.xda-developers.com/nexus-6/general/mod-stereoaudio-recording-t3001680.

Page 12 of 14 4. TWO MIC DIRECTION OF ARRIVAL (DOA) ESTIMATION APPLICATION The algorithm is developed for providing the hearing-impaired user with an estimate of the speaker direction on a graphical user interface (GUI). The application is trained to perform in noisy conditions as well. See Figure 8 for a screenshot of the Android application. Start Estimated Angle (numeric value) Stop Settings: Threshold Time (ms): 10 (default) Duration: 2 (default) Calibrated Threshold Estimated Angle (graphical display) Blue marker Figure 8 Following are the key things to keep in mind while using the application: Before starting the application, please make sure the Smartphone is placed on an elevated surface (so that the microphone are not covered). The GUI should still be fully visible to the user. Press the Start button to start the application. The algorithms assumes that the first few frames are silence/noise only. Threshold Time specifies this duration (which can be modified using the Settings button). After the initial few frames, the Calibrated Threshold display will stop at a fixed value. Now the application is ready and you may start speaking. The application will receive the microphone signals and indicate the direction of the speaker using numeric values as well as using graphical marker.

Page 13 of 14 The behavior of the application can be modified using Settings button. Increasing the Threshold time will allow the algorithm to be more noise-robust. Increasing the Duration will make the DOA estimation marker more stable and change less rapidly. In presence of speech, the blue marker will continuously follow the speaker in all directions. In absence of speech, the blue maker will point to the last estimated speaker location, even with a high-energy noise source present in the room (such as Vacuum cleaner or coffee machine). To learn more about the application, please refer to our video demos on http://www.utdallas.edu/ssprl/hearing-aid-project/. Figure 9 Video screenshots for Demo videos

Page 14 of 14