Skip to content

Automated av content transcription search for your website

License

Notifications You must be signed in to change notification settings

algolia-samples/avsearch

Repository files navigation

AVSearch

Automated YouTube Audio/Video content transcription search for your website

Live demo


Getting Started

1. Installation

# Install FFmpeg
brew install ffmpeg # MacOS
apt install ffmpeg # Linux
choco install ffmpeg # Windows (Chocolatey)

# Pip
python3 -m pip install git+https://github.com/algolia-samples/avsearch

# Wheel file (Download the latest release from https://github.com/algolia-samples/avsearch/releases)
python3 -m pip install avsearch-?.?.?-py3-none-any.whl

# From source
git clone https://github.com/algolia-samples/avsearch
cd avsearch

# https://python-poetry.org/docs/#installation
poetry install && poetry build

# Optionally, install the wheel file
python3 -m pip install ./dist/avsearch-?.?.?-py3-none-any.whl
# Or, use poetry's shell
poetry shell

2. Set up Algolia

To use this tool, you need an Algolia account. If you don't have one already, create an account for free. Note your Application ID during this process.

Once you have an account, your API Key can be located here. You don't need to create an Index to get started, Algolia will automatically create the index for us - just come up with a good name!

3. Usage via the command line

export ALGOLIA_APP_ID=<your-app-id>
export ALGOLIA_API_KEY=<your-api-key>
export ALGOLIA_INDEX_NAME=<your-index-name>
# Single video
av-search --targets "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
# Multiple videos
av-search --targets "https://youtu.be/dQw4w9WgXcQ,https://youtu.be/_C9PMLr_XC8"

4. Usage via Python

from avsearch import AVSearch

avs = AVSearch(app_id='AAAA1234', ...)
results = avs.transcribe(
    ["https://www.youtube.com/watch?v=zOz-Sk4K-64&list=PLuHdbqhRgWHLRlmvQ1OKLdjslSxXrAAjk"]
)

Resources

Contributing

This project is open source and welcomes contributions. We only ask that you adhere to our Code of Conduct when contributing and our process outlined below:

  1. After completing your change, run the scripts/pre-commit.sh script to format and lint your code to fit our styling. This will run Black and Flake8 automatically with our settings.
  2. Submit a Pull Request with your changes and request approval.
  3. Allow one week for your code to be reviewed by an Algolia team member. If changes are requested, these will need to be resolved before the changes are merged.

Authors

About

Automated av content transcription search for your website

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published