simliai / RadioDemo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simli Radio Demo

This is a showcase of the Simli Lipsync API in action. The demo works by getting an mp3 radio stream, converting it to pcm16 using ffmpeg and sending the pcm16 frames to the Simli Lipsync API over websockets.

For the response spec, check Websockets.md

  1. OpenCVRenderer.py: Uses OpenCV and PyAudio to render the video and audio on the screen.

Installation

  1. Use python 3.11, anything lower is not guaranteed to work Fast enough.
  2. Install FFMPEG
  3. Create a virtual environment and install the requirements:

on Linux/MacOS

python3 -m venv .venv
source .venv/bin/activate

On Windows

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

Usage

OpenCVRenderer.py

! Disclaimer: Moving the OpenCV window around can cause the audio to be out of sync with the video.

python OpenCVRenderer.py

To close just enter ctrl+c in the terminal.

About


Languages

Language:Python 100.0%