Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A ⚡️ Lightning.ai ⚡️ app demo for Voice based web search using OpenAI's Whisper and DuckDuckGo

License

NotificationsYou must be signed in to change notification settings

Nachimak28/LAI-voice-search-openai-whisper-demo

Repository files navigation

LAI

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

Sample output

Sample output

To run 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

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

to test and link

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.

Steps followed to build such a feature in this minimal app

  • 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

FAQ

  • 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.

TODOs

  • 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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp