Safeway Recording Assistant is a Python tool for Safeway support agents to retrieve, play, transcribe, and query company calls from Vonage.
- OpenAI API Key: You need to set your OpenAI API Key for transcription and query purposes.
- Function for OpenAI Requests: Ensure you have a function in a separate program that handles requests to OpenAI.
- MP3 Recording Directory: Obtain the full directory path of the MP3 recordings and update the necessary files with this path.
- Elasticsearch: Set up an instance of Elasticsearch to run locally on your computer.
-
Clone the Repository:
git clone https://github.com/lucas-svi/Safeway-Recording-Assistant.git cd Safeway-Recording-Assistant
-
Set Your OpenAI API Key: In your environment variables, set the OpenAI API key:
export OPENAI_API_KEY='your_openai_api_key'
-
Ensure you have a function in a separate program to handle OpenAI requests.
-
Update MP3 Recording Directory: Locate the files requiring the MP3 recording directory path and update them with the full directory path of your recordings.
-
Set Up Elasticsearch: Download and install Elasticsearch from Elasticsearch Downloads.
-
Start Elasticsearch:
-
Index Recordings: Run the indexing script to index all recordings:
python elastic_search_index.py
Run Flask Application: Start the Flask application to handle queries:
python elastic_search_flask.py
Querying Recordings: Once the Flask application is running, you can make requests to http://localhost:5000 using the following arguments:
date
time
caller_id
call_id
Graphical User Interface:
Open program.py to access the Tkinter interface, which allows you to:
- Retrieve any recording.
- Play recordings.
- Transcribe and diarize audio.
- Query the audio to understand the conversation between the customer and the support agent. -> Example Requests Retrieve a recording by date:
curl -X GET "http://localhost:5000/recordings?date=2024-08-01"
Use the Tkinter interface:
python program.py