Inspiration
Managing personal finances can be daunting, especially when balancing daily expenses with long-term investments. I wanted to create a tool that merges convenience with insights using voice recognition to simplify expense logging and integrating stock market data to encourage better financial decisions. This project combines my interests in artificial intelligence, data analysis and financial literacy into one streamlined application.
What it does
This project is a voice-driven financial tracking and insights tool that helps users take control of their spending while gaining insights into the stock market.
- Voice-Based Expense Logging
- Users can log their daily expenses simply by speaking into a microphone.
- The system uses speech-to-text technology to interpret the user's voice input and automatically categorize the expense.
For example, saying "Spent 50 on groceries" logs the expense description as "groceries" and the amount as $50 in the database.
Automated Expense Summaries
The application generates daily, weekly, and monthly summaries of the user's spending habits.
Each summary includes the total amount spent, providing a clear view of financial trends over time.
The summaries are stored in a dedicated database table for easy access and analysis.
Stock Market Insights
The app connects to the Alpha Vantage API to fetch data about the top-performing stocks.
Users can view the latest stock market trends and performance metrics. -This feature is designed to encourage users to think about investment opportunities and inspire better financial planning.
Secure and Organized Data Storage
All user data, including expenses and summaries, is stored securely in a MySQL database.
Sensitive information, such as API keys and database credentials, is managed using .env files to ensure privacy and security.
How we built it
- Technologies Used:
- Python: Main programming language for backend logic.
- MySQL: For structured and persistent data storage.
- pyaudio & speech_recognition: For voice input and transcription.
- requests: For making API calls.
- dotenv: To manage environment variables securely.
- Development Process:
- Step 1: Set up the database schema for users, expenses, summaries, and stock data.
- Step 2: Integrated voice recognition for logging expenses and ensured real-time database updates.
- Step 3: Connected to Alpha Vantage API to fetch and store stock performance data.
- Step 4: Developed logic to generate and display daily, weekly and monthly summaries.
Challenges we ran into
- Voice Recognition Accuracy:
- The speech recognition library sometimes struggled with different accents, background noise, or unclear speech.
Solution: Improved the pre-processing by adjusting microphone sensitivity and providing clearer instructions to the user.
Error Handling for External APIs:
The stock API occasionally returned incomplete or unexpected data formats.
Solution: Added error handling for HTTP requests and response parsing.
Database Constraints:
Designing efficient relationships between tables (e.g., ensuring each expense belongs to a valid user) was tricky.
Solution: Iterated on the schema multiple times to find a balance between complexity and usability.
4.Learning Curve:
- Some libraries, like pyaudio, required additional configuration (especially on Linux/Ubuntu).
- Solution: Spent time researching and debugging system-level errors related to audio devices.
Accomplishments that we're proud of
- Successful Voice Integration
- Implemented a robust speech-to-text system using the SpeechRecognition library to accurately capture and process user voice commands.
Transformed a complex idea into a seamless user experience where expenses can be logged with just a few words.
Automated Financial Summaries
Built dynamic daily, weekly, and monthly expense summaries that are generated automatically, providing users with real-time insights into their spending habits.
Ensured that all data is securely stored in a well-structured MySQL database.
Stock Market Insights Feature
Integrated the Alpha Vantage API to fetch real-time stock market data, empowering users to explore investment opportunities alongside managing expenses.
Created a functional pipeline to process, store, and present stock performance data effectively.
Error Handling and Resilience
Developed a system that gracefully handles issues like failed API calls, voice misinterpretations, and database errors, ensuring the application remains user-friendly and reliable.
Secure Environment Management
Incorporated the use of .env files for managing sensitive credentials like API keys and database configurations, emphasizing best practices in security.
Scalable Database Design
Designed a modular database schema with tables for users, expenses, summaries, and stock data to accommodate future feature expansions or user growth.
Learning and Overcoming Challenges
Navigated through new technologies, like voice recognition and API integrations, while troubleshooting multiple issues such as ALSA errors for microphone input.
Gained deeper insights into Python, MySQL, and handling real-world data complexities.
A Step Toward Financial Literacy
Created a tool that has real-world value by simplifying expense tracking and introducing users to stock market awareness, making financial literacy more accessible.
What we learned
- Voice Recognition Technology
- Explored the intricacies of speech-to-text systems using SpeechRecognition.
Learned how to optimize voice input for better accuracy and user experience while managing system constraints like background noise.
Database Design and Optimization
Improved our understanding of relational database structures, including efficient schema design with primary keys, foreign keys, and ENUM data types.
Learned how to handle real-time data insertion and retrieval using MySQL.
API Integration -Gained experience working with third-party APIs like Alpha Vantage, including authentication, handling rate limits and parsing JSON data.
Learned to validate and handle unpredictable API responses to ensure seamless functionality.
Error Handling and Debugging
Developed skills in identifying and resolving issues such as ALSA audio input errors and database connection failures.
Understood the importance of implementing robust exception handling to make applications more resilient.
Environment Management
Mastered the use of .env files for securely managing sensitive information like API keys and database credentials.
Learned how environment variables improve portability and security in project deployment
What's next for SpendWise
- GUI Implementation: Build a user-friendly interface for ease of interaction.
- Real-Time Insights: Add real-time notifications about spending habits and stock market updates.
- Budget Planning: Allow users to set budgets and track spending against those limits.
- Mobile Compatibility: Extend the app to Android and iOS for on-the-go financial management.
Log in or sign up for Devpost to join the conversation.