OctoTube: Voice Search for YouTube

Have you ever been in a situation where you are going back and forth in a YouTube video searching for a specific phrase? No more. There is a little script that can search any video (even without transcription) lightning-fast and point you to the exact …


This content originally appeared on DEV Community and was authored by grace

Have you ever been in a situation where you are going back and forth in a YouTube video searching for a specific phrase? No more. There is a little script that can search any video (even without transcription) lightning-fast and point you to the exact second the phrase occurs. Enter OctoTube!

Get Started
Clone the Octopus GitHub repository:

git clone --recurse-submodules https://github.com/Picovoice/octopus.git

Run this from the root of the repository to install Python dependencies:

pip3 install -r demo/youtube/requirements.txt

Get an AccessKey from Picovoice Console. It is free.

Find a video on YouTube you like to search and from the root of the repository run:

python3 demo/youtube/octotube.py \
--access-key ${ACCESS_KEY} \
--url ${YOUTUBE_VIDEO_URL} \
--phrases ${SEARCH_PHRASE0} ${SEARCH_PHRASE1}

You should get something like the below (yes, I watch too much Silicon Valley):

indexed 3024 seconds of audio in 54.36 seconds
searched 3024 seconds of audio for 1 phrases in 0.01013 seconds
pied piper >>>
[0.5] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=784
[1.0] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=840
[1.0] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=2355
[1.0] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=2940

Notice that indexing is the bulk of the processing time. The good news is once the video is indexed, it is super fast to search for more (similar to how the Google search engine works):

searched 3024 seconds of audio for 1 phrases in 0.00655 seconds
jian yang >>>
[0.3] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=1332
[0.7] https://www.youtube.com/watch?v=Lt6PPiTTwbE&t=2478

How Does it Work?
OctoTube uses the Picovoice Speech-to-Index engine (also known as Octopus). Octopus directly indexes audio without relying on a text representation (Learn more). Octopus runs on Android, iOS, Ubuntu, macOS, Windows, and even modern web browsers.

Start Building
Go to Octopus’s GitHub and start building your applications with Octopus!


This content originally appeared on DEV Community and was authored by grace


Print Share Comment Cite Upload Translate Updates
APA

grace | Sciencx (2024-08-22T20:59:56+00:00) OctoTube: Voice Search for YouTube. Retrieved from https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/

MLA
" » OctoTube: Voice Search for YouTube." grace | Sciencx - Thursday August 22, 2024, https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/
HARVARD
grace | Sciencx Thursday August 22, 2024 » OctoTube: Voice Search for YouTube., viewed ,<https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/>
VANCOUVER
grace | Sciencx - » OctoTube: Voice Search for YouTube. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/
CHICAGO
" » OctoTube: Voice Search for YouTube." grace | Sciencx - Accessed . https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/
IEEE
" » OctoTube: Voice Search for YouTube." grace | Sciencx [Online]. Available: https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/. [Accessed: ]
rf:citation
» OctoTube: Voice Search for YouTube | grace | Sciencx | https://www.scien.cx/2024/08/22/octotube-voice-search-for-youtube/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.