A simple Streamlit app displaying the audio transcription to search portion of the pipeline for ClipABit -- a semantic search engine for video editors.
-
Install the requirements
$ pip install -r requirements.txt -
Run the app
$ streamlit run streamlit_app.py
This project demonstrates how to generate audio transcription embeddings using OpenAI Whisper, and explores different search algorithms for retrieval tasks. The goal is to experiment with various fusion and selection strategies for searching among multimodal embeddings.
-
Audio Transcription & Embedding
- Upload audio files via the Streamlit app.
- Transcribe each audio file using Whisper.
- Generate embeddings for each transcription.
-
Search Algorithms Tested
- Average Fusion: Combine all modality vectors into a single index vector (or average similarity scores) and retrieve the most relevant result.
- Tiny LLM Select: Use a small language model (or classifier) to select the primary modality based on the prompt, then retrieve from that modality's index only.
- Tiny LLM Weighted: Use a small language model to assign weights to each modality and fuse retrieval results using those weights.
Users can choose which search algorithm to use for semantic retrieval:
- Average Fusion: Combines vectors or similarity scores for retrieval.
- Tiny LLM Select: Uses a small language model to select the primary modality for search.
- Tiny LLM Weighted: Assigns weights to each modality using a small LLM and fuses results accordingly.
The sidebar provides live data on the following metrics for each search and embedding operation:
- Quality: Subjective measure (e.g., by virtue of having eyes, user can judge relevance).
- Latency: Time to embed a query, search, and merge results.
- Embedding Time: Per-clip embedding time (batch and single).
- Storage: Database size per clip and total.
- Computational Intensity: Resource usage for each operation.
Local Development: http://localhost:8501 (Running locally)
Status: ✅ Always Active - Monitored by UptimeRobot to prevent hibernation
New Deployment: Coming soon - deploy this repository to get your own dedicated URL
# Start the app in background
./run_streamlit.sh start
# Check status
./run_streamlit.sh status
# View logs
./run_streamlit.sh logs
# Stop the app
./run_streamlit.sh stop- Install dependencies:
pip install -r requirements.txt
- Start the app:
streamlit run streamlit_app.py
- Push to GitHub:
git add . git commit -m "Deploy to Streamlit Cloud" git push origin main
- Go to share.streamlit.io and deploy!
Streamlit Cloud hibernates apps after 12 hours of inactivity. To keep apps always running:
- Go to uptimerobot.com
- Add monitor for your app URL
- Set 5-minute intervals
- App stays active forever! ✅
Use the included workflow: .github/workflows/keep-alive.yml
Run the included script: ./ping_app.sh
Files: See UPTIMEROBOT_SETUP.md for detailed instructions.
- Implement and compare the search algorithms listed above.
- Experiment with different fusion strategies and LLMs for selection/weighting.