Voice Diary is a diary application that converts user speech into text and analyzes emotions to record them. It visually displays emotions and helps users track their emotional patterns over time 😃
- Voice Recording: Record user speech and send it to the server.
- Text Conversion: Convert speech to text.
- Emotion Analysis: Analyze emotions from the converted text.
- Calendar View: Visualize emotional data in a calendar format.
- History Tracking: View text and emotions for specific dates.
- Backend: Flask (Python)
- Frontend: HTML, CSS, JavaScript
- Database: JSON file for data storage
- Cloud Services:
- Google Cloud Speech-to-Text API
- Google Cloud Natural Language API
- Install the required packages
pip install flask google-cloud-speech google-cloud-language pydub
- Install FFmpeg
- Download and install FFmpeg, then add it to your system PATH.
- Set up Google Cloud Service Account
- Generate a service account key (JSON) from Google Cloud Console
demo.mp4
- Main Page: The homepage where users can record their voice, analyze emotions, and navigate to past records or the calendar.
- Past Record: A page showing previous transcriptions and their corresponding emotions for specific dates.
- Emotion Calendar: A calendar view displaying the emotions recorded for each day.
-
Recording
- Click the "Recording" button to start recording your voice.
- Click "Stop Recording" when you're done.
- The recorded audio is sent to the server for transcription and emotion analysis.
-
Text Conversion
- The recorded voice is converted into text using Google Cloud Speech-to-Text API.
-
Emotion Analysis
- The transcription is analyzed using Google Cloud Natural Language API to determine the emotion (happy 😄, sad 😢, angry 😡, neutral😐).
-
Data Visualization
- The transcription and emotion are saved with the current date.
- Users can view emotions in a calendar view or check detailed past records.