Granny is an app aimed at helping people understand their emotions without having to overcome difficulties such as seeking out outside assistance. One may easily open the app and talk to Granny, and Granny will respond, reflective of your emotions. Voice recording, text transcription, emotion data, and data analysis are stored and may be perused at one's leisure, (not yet implemented) making Granny an ideal journaling app for the emotionally vulnerable.
Further details can be found here.
Currently only Android is supported.
- Make sure your devices are set up as outlined here and AndroidStudio installed.
- Clone the project.
- Register an Azure Cognitive Services Account on Emotion API and retrieve a key.
- Under the root directory, create a file
config.jsand add:
module.exports = {
OcpApimSubscriptionKey: '[your-key]',
};
- Go to Granny's project directory, then run
npm install. - Go to
./node_modules/react-native-audio/android/...../AudioRecorderManager.javaand addbody.putInt("maxAmplitude", recorder.getMaxAmplitude());here:
...
private void startTimer(){
...
@Override
public void run() {
WritableMap body = Arguments.createMap();
body.putInt("currentTime", recorderSecondsElapsed);
body.putInt("maxAmplitude", recorder.getMaxAmplitude()); // <-- ADD HERE
sendEvent("recordingProgress", body);
recorderSecondsElapsed++;
}
...
}
...
- Import Granny into AndroidStudio, and press Run.
- Return to the root project directory, and run
react-native run-android.
The app is built on React Native and embedded with Microsoft Azure Emotion API to understand people's emotion in near real-time. We use react-native camera to capture user's face and call the emotion API every several seconds (thanks to react-native-fetch-blob).
To detect whether the user has done talking, we modified react-native-audio to return maxAmplitude during audio recording process and compare it with the background amplitude to decide whether or not to continue to the next question. The background amplitude is collected during the opening - that's why you need to keep calm and wait for Granny.
Granny's voice is contributed by react-native-tts. Granny's actions are contributed by react-native-animatable.
The charts in the report is supported by react-native-pathjs-charts.



