Skip to content

Commit

Permalink
readme cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
neonwatty committed Nov 18, 2024
1 parent 4f273ed commit f1733d8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ RUN python3 --version && pip3 --version
RUN ffmpeg -version

ENV PYTHONPATH=.
ENV GRADIO_SERVER_PORT 8501
ENV GRADIO_SERVER_NAME "0.0.0.0"
ENV GRADIO_SERVER_PORT=8501
ENV GRADIO_SERVER_NAME="0.0.0.0"

WORKDIR /home

Expand Down
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
<a href="https://huggingface.co/spaces/neonwatty/bleep_that_sht" target="_parent"><img src="https://img.shields.io/badge/🤗-HuggingFace%20Space-cyan.svg" alt="HuggingFace Space"/></a>
<a href="https://colab.research.google.com/github/jermwatt/bleep_that_sht/blob/main/beep_that_sht_walkthrough.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> <a href="https://www.youtube.com/watch?v=U8Ki9dD3HF0" target="_parent"><img src="https://badges.aleen42.com/src/youtube.svg" alt="Youtube"/></a>
<a href="https://colab.research.google.com/github/jermwatt/bleep_that_sht/blob/main/beep_that_sht_walkthrough.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> <a href="https://www.youtube.com/watch?v=U8Ki9dD3HF0" target="_parent"><img src="https://badges.aleen42.com/src/youtube.svg" alt="Youtube"/></a>
[![Python application](https://github.com/neonwatty/bleep_that_sht/actions/workflows/python-app.yml/badge.svg)](https://github.com/neonwatty/bleep_that_sht/actions/workflows/python-app.yml/python-app.yml) <a href="https://www.producthunt.com/posts/bleep-that-sh-t?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-bleep&#0045;that&#0045;sh&#0045;t" target="_parent"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=470378&theme=light" alt="Bleep&#0032;That&#0032;Sh&#0042;t&#0033; - A&#0032;whisper&#0032;app&#0032;that&#0032;bleeps&#0032;out&#0032;chosen&#0032;words&#0032;in&#0032;YouTube&#0032;videos | Product Hunt" style="width: 250px; height: 45px;" /></a>


# bleep that sh*t
# bleep that sh\*t

Make anyone sound naughty / funny with Python.

Bleep out keywords of your choice from an mp4 by leveraging a transcription model (here Whisper) to transcribe the audio, then target and replace chosen words with *bleep* sounds using the extracted timestamps associated with your chosen word(s).
Bleep out keywords of your choice from an mp4 by leveraging a transcription model (here Whisper) to transcribe the audio, then target and replace chosen words with _bleep_ sounds using the extracted timestamps associated with your chosen word(s).

All processing is performed locally.

- [Version overall comparison](#version-overall-comparison)

- [Examples](#examples)
- [Installation](#installation)
- [For local videos](#for-local-videos)
- [For Youtube videos](#for-youtube-videos)
- [Walkthrough](#walkthrough)

All processing is performed locally - see the streamlit app (setup below) and detailed walkthrough notebook (see `beep_that_sht_walkthrough.ipynb`) to play / see nitty gritty details. Click [![HuggingFace Space](https://img.shields.io/badge/🤗-HuggingFace%20Space-cyan.svg)](https://huggingface.co/spaces/neonwatty/bleep_that_sht) to try out this toy app directly in your browser. WARNING: the machine this Space is running on is pretty small - so use it to try out shorter (<2min) videos.
## Examples

Some examples of the end product (make sure to turn volume on, its off by default).

https://github.com/user-attachments/assets/da50f8a9-27ba-4747-92e0-72a25e65175c

Let's look more closely at the last example above - below is a short clip we'll bleep out some words from using the pipeline in this repo. (make sure to turn on audio - its off by default)
Let's look more closely at the last example above - below is a short clip we'll bleep out some words from using the pipeline in this repo. (make sure to turn on audio - its off by default)

https://github.com/neonwatty/bleep_that_sht/assets/16326421/fb8568fe-aba0-49e2-a563-642d658c0651


Now the same clip with the words - "treetz", "ice", "cream", "chocolate", "syrup", and "cookie" - bleeped out


https://github.com/neonwatty/bleep_that_sht/assets/16326421/63ebd7a0-46f6-4efd-80ea-20512ff427c0

## Installation

## Install instructions
### For local videos

To get setup to run the notebook / bleep your own videos / run the strealit demo first install the requirements for this project by pasting the below in your terminal.

Expand All @@ -42,9 +50,7 @@ pip install -r requirements.gradio

You will need [ffmpeg](https://www.ffmpeg.org/download.html) installed on your machine as well.



## Instructions for bleeping **youtube** videos via youtube / shorts url
### For Youtube videos

Start this streamlit demo locally that lets you enter in a youtube / shorts url to a video you wish to bleep

Expand All @@ -58,14 +64,12 @@ Alternatively you can start a gradio server with the same functionality
python -m bleep_that_sht/gradio_app_url_download.py
```

This is the version hosted in the HF space [![HuggingFace Space](https://img.shields.io/badge/🤗-HuggingFace%20Space-cyan.svg)](https://huggingface.co/spaces/neonwatty/bleep_that_sht).


You can also use docker compose

## Instructions for bleeping your own **local** videos
```bash
docker compose up
```

Start this streamlit demo locally that lets you drag and drop local video files to bleep
## Walkthrough

```python
python -m streamlit run bleep_that_sht/app_video_upload.py
```
See `beep_that_sht_walkthrough.ipynb`) to play / see nitty gritty details.
2 changes: 1 addition & 1 deletion bleep_that_sht/gradio_app_url_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
model_selection = gr.Dropdown(
choices=avaliable_models,
value="base",
label="whisper model (base only in HF space)",
label="whisper model (base only in demo)",
info="whisper model selection",
interactive=False,
)
Expand Down
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
services:
ytdatakit:
image: ghcr.io/neonwatty/ytdatakit:latest
image: ghcr.io/neonwatty/bleep_that_sht:latest
container_name: bleep_that_sht
ports:
- 8501:8501
volumes:
- ./data:/home/data

0 comments on commit f1733d8

Please sign in to comment.