- Notifications
You must be signed in to change notification settings - Fork3
A ⚡️ Lightning.ai ⚡️ app demo for Voice based web search using OpenAI's Whisper and DuckDuckGo
License
Nachimak28/LAI-voice-search-openai-whisper-demo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This app is a simulation of a Voice search feature provided by search engines like Google, DuckDuckGo using OpenAI'sWhisper model.
This ⚡Lightning app ⚡ was generated automatically with:
lightning init app LAI_voice_search_openai_whisper_demo
Prerequisites
- Create a conda/venv environment
We use conda here but you can use whichever tool you're comfortable with
conda create --yes --name oaiwhisper python=3.8conda activate oaiwhisper
- Install FFMPEG
FFMPEG is necessary for the audio processing
- For Windows: Followthese steps
- For Ubuntu/Debian:
sudo apt-get updatesudo apt-get install -y ffmpeg
- Install packages
pip install -r requirements.txt
- Install app
First, install LAI_voice_search_openai_whisper_demo (warning: this app has not been officially approved on the lightning gallery):
lightning install app https://github.com/theUser/LAI_voice_search_openai_whisper_demo
- Run locally
Once the app is installed, run it locally with:
lightning run app LAI_voice_search_openai_whisper_demo/app.py
If the above does not work, manually setup the environment:
git clone https://github.com/Nachimak28/LAI-voice-search-openai-whisper-democd LAI-voice-search-openai-whisper-democonda create --yes --name oaiwhisper python=3.8conda activate oaiwhisperpython -m pip install -r requirements.txtpython -m pip install lightningpython -m lightning run app app.py# to run on lightning cloudpython -m lightning run app app.py --cloud
Run it on thelightning cloud with:
lightning run app LAI_voice_search_openai_whisper_demo/app.py --cloud
Run flake to make sure all your styling is consistent (it keeps your team from going insane)
flake8.
To test, follow the README.md instructions in the tests folder.
- Obtain the Speech-to-text (transcription) output using Whisper
- Use this transcribed output string as an input forduckduckgo search
- Once the web search results are obtained, render using HTML
Why use DuckDuckGo(DDG) and not Google search?Ans: Google has a lot of rate limiting applied and frequent searches via code lead to getting blocked resulting in status code: 429 - Too many requests. Apparently DDG does not have super strict rate limiting.
Why Lightning.ai ?Ans: Provisioning the infra and deployment is automated, all one needs to do is focus on business logic. Also HF spaces are too crowded with mutiple such demos.
- Update code to accept microphone input as soon as Gradio bug is resolved
- Write unit tests
- Run given test
- Add comments and prepare code for submission to Lightning Gallery
About
A ⚡️ Lightning.ai ⚡️ app demo for Voice based web search using OpenAI's Whisper and DuckDuckGo
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.