Voice Restaurant Reviews

Voice Restaurant Reviews is a web application that allows users to record, transcribe, and summarise voice-based restaurant reviews. Users can submit their voice recordings, which are then transcribed using Open AI's Whisper and summarised using OpenAI's GPT-4 model. The application is built using Python, Streamlit, and the OpenAI API.

Table of Contents

Features

  • Record voice-based restaurant reviews
  • Transcribe voice recordings using the OpenAI API
  • Summarize transcribed text using GPT-4
  • Save recorded and transcribed data to a database
  • Display and manage previously submitted reviews

Requirements

  • Python 3.7+
  • Streamlit
  • psycopg2
  • OpenAI

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/voice-restaurant-reviews.git
  1. Create and activate a virtual environment:
cd voice-restaurant-reviews
python -m venv venv
source venv/bin/activate  # For Windows: venv\Scripts\activate
  1. Install the required packages:
pip install -r requirements.txt
  1. Set up environment variables for the OpenAI API Key and the Database URL:
export OPENAI_API_KEY=your_openai_api_key
export DATABASE_URL=your_database_url
  1. Run the Streamlit application:
streamlit run main.py

Usage

  1. Open the application in your web browser (the default URL is http://localhost:8501).
  2. Click the "Record" button and start recording your voice-based restaurant review.
  3. After recording, the application will transcribe and summarize your review.
  4. Review the original transcription and the summarized output, and edit if necessary.
  5. Click the "Submit" button to save your review to the database.
  6. View and manage your previously submitted reviews in the "Previous Surveys" section.

Configuration

The application can be further configured by modifying the main.py and frontend.py files. For example, you can adjust the layout, initial sidebar state, or page title in the main.py file.

Contributing

Contributions are welcome! To contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch with a descriptive name.
  3. Make your changes and commit them with clear and concise commit messages.
  4. Push your changes to your forked repository.
  5. Create a pull request, describing the changes you made and their purpose.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contact

If you have any questions, suggestions, or issues, feel free to contact the project maintainers or open an issue on the GitHub repository.