This repository is a companion to Using Metaphone to handle bad transcriptions in voice search for sommeliers . Read the blog post for an explanation of how this code works.
This a Streamlit app. You can check it out on Streamlit Cloud.
You'll need to place your OpenAI API key in .streamlit/secrets.toml
:
OPENAI_API_KEY = "<your-openai-api-key>"
Then run poetry run streamlit run main.py
.
This demo uses OpenAI whisper, which costs $0.006/minute as of May 2023. It's cheap.
index.py
prepares all the indexes inwines.duckdb
.search.py
implements querying our indexes.main.py
is our Streamlit app.
The blog post walks through our search indexes and how we query them in detail.
This codebase is purely educational. If you see errors, please open a PR. If you want to make improvements, I encourage you to fork it and talk about your changes -- let me know if you do!