An open API service indexing awesome lists of open source software.

https://github.com/lich-corals/talkative-rick

A quickly (and poorly) written script to make rick astley say whatever you want.
https://github.com/lich-corals/talkative-rick

python rickroll

Last synced: 2 months ago
JSON representation

A quickly (and poorly) written script to make rick astley say whatever you want.

Awesome Lists containing this project

README

          

## Talkative Rick
A python-script to make Rick say whatever you want! - With the option to use any images you want instead of Rick.

> [!IMPORTANT]
> For _reasons_, this project has been moved to Codeberg.
>
> If you still want to support this project, consider starring it on Codeberg.
>
> [![Codeberg](https://img.shields.io/badge/-view_on_codeberg-2185D0?style=for-the-badge&logo=Codeberg&logoColor=white)](https://codeberg.org/Lich-Corals/talkative-rick)



### Installation
* Clone the repository
* Install python modules `numpy` and `librosa` using `pip` or your system's package manager
* Install `ffmpeg` using your system package manager

### Usage
* Replace the audio file in the `res` directory
* Optionally replace the images in `res` too
> [!NOTE]
> The filenames must remain `audio.mp3`, `closed.jpg` and `open.jpg`!
* Run the script; (arguments) are optional, [arguments] are obligatory:
```bash
python3 main.py (--averaging-[global|padded|local]_[tolarance]) (audio file) [output file]

# for example:
python3 main.py --averaging-global_1 ~/Music/some_audio.ogg ~/Videos/talkative_rick.mp4
# or
python3 main.py --averaging-padded_0.5 ~/Videos/talkative_rick
# or
python3 main.py --averaging-local_1.2 ~/Music/some_audio.mp3 ~/Videos/talkative_rick.mp4
```
> [!NOTE]
> Averaging modes determine which audio volumes are considered to be voice.
>
> The tolerance only affects padded and global modes.
> Higher tolerance means more will be interpreted as voice; default is 1.0
* If just the base name of the output is provided, it should be in your current terminal directory.

> [!TIP]
> The audio tracks generated by [Sound of Text](https://soundoftext.com/) are perfectly suited to be used with this project.

### Problems?
If you encounter any problems with the script and you believe you found a bug, feel free to open an issue on GitHub.

#### Windows support?
While this script doesn't use any deeply rooted Linux-only features, I don't know if it is fully Windows compatible. The critical parts are the following:
* Hard-coded relative filepaths using a forward slash (e.g.: `./res/`)
* Symlinks are used... I don't know if Windows supports those.
* ffmpeg is executed using `os.system()` with a hard-coded command. This command may be different of Windows.

### Contributing
You are welcome to improve the script and open a pull request.