Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/derailed-dash/youtube-and-video
Using Python APIs and AI to download YouTube videos, convert to mp3, transcribe audio
https://github.com/derailed-dash/youtube-and-video
cloud-run gemini-api google-cloud jupyter-notebook python streamlit vertex-ai youtube
Last synced: 3 months ago
JSON representation
Using Python APIs and AI to download YouTube videos, convert to mp3, transcribe audio
- Host: GitHub
- URL: https://github.com/derailed-dash/youtube-and-video
- Owner: derailed-dash
- License: mit
- Created: 2024-10-22T07:40:35.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-11-16T14:29:02.000Z (3 months ago)
- Last Synced: 2024-11-16T14:29:26.717Z (3 months ago)
- Topics: cloud-run, gemini-api, google-cloud, jupyter-notebook, python, streamlit, vertex-ai, youtube
- Language: Jupyter Notebook
- Homepage: https://medium.com/me/stats/post/c3068f82bbe0
- Size: 177 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Youtube and Video
## Repo Overview
Here you will find examples of how to work with YouTube videos using Python and various APIs.
### Part 1: [youtube-demos.ipynb](src/notebooks/youtube-demos.ipynb)
In this notebook I demonstrate:
- A Jupyter notebook that provides a minimum viable product for a YouTube video downloader application.
- How to quickly setup and use the notebook, including how to run it with zero install effort, in Google Colab.
- Three different ways to download YouTube videos and extract audio to mp3.
- Using the Python Speech Recognition library, along with the Google Speech Recognition API, to transcribe mp3 audio into text.
- Extracting pre-existing transcripts from YouTube videos, and how to translate such transcripts.### Part 2: [youtube-demos-with-google-ai.ipynb](src/notebooks/youtube-demos-with-google-ai.ipynb)
- Using the Google Video Intelligence API to provide more reliable and more accurate trancription.
- Using Google Gemini Generative AI to transcribe, translate and summarise video content.
- How to build your Jupyter notebook so it can run locally, in Google Colab, or in Google Vertex AI Workbench.## Future Plan
- Convering to a Streamlit application
- Hosting on Google Cloud Run
- Terraform## Overview of Jupyter Notebooks
If you don't know much about Jupyter notebooks, then I suggest you start with my article [here](https://medium.com/python-in-plain-english/five-ways-to-run-jupyter-labs-and-notebooks-23209f71e5c0), which covers:
- The value and point of Jupyter notebooks.
- Good use cases for Jupyter notebooks.
- Several ways to run the notebooks
- How to run your own - or someone else's notebooks (like the ones in this repo) - quickly and easily, _for free_ in [Google Colab](https://colab.research.google.com/).### Running the Jupyter Notebook Locally
Here we create a Python virtual environment, install Jupyter notebook to the environment, and then run our notebooks from there.
```bash
py -m pip install --upgrade pip# Create virtual env, if you haven't already
py -m venv .venv# Activate the venv
./.venv/Scripts/activate# Install requirements - i.e. notebook
py -m pip install -r requirements.txt
```Now you can use your venv as your Jupyter kernel.