Skip to main content

Generate a pixel-art 'call style' avatar video reacting to audio.

Project description

sosi-call

PyPI Python License

Generate a pixel-art “call style” avatar video reacting to audio: a circular avatar + a pulsing ring synced to voice amplitude.

How it works

  • ✅ Works with audio like .wav, .mp3, .ogg, etc. (whatever your environment can decode)
  • ✅ Output: square MP4 (default 1080×1080), black background, pixel-art look
  • ✅ Includes both Python API and a CLI

Note: This package uses MoviePy, which relies on FFmpeg being available in your system PATH.

Demo video

Demo video

Open: docs/demo3.mp4


Install

pip install sosi-call

FFmpeg (required)

If you don’t have ffmpeg installed:

Ubuntu/Debian

sudo apt update && sudo apt install -y ffmpeg

macOS (Homebrew)

brew install ffmpeg

Quickstart (Python)

from sosi_call import render_call_video, RenderConfig

cfg = RenderConfig(
    size=1080,  # output resolution (square)
    low=240,    # internal pixel-art resolution (lower=faster+more chunky)
    fps=30,
    gain=3.2,   # sensitivity
    gamma=0.45, # boosts quieter voice
)

render_call_video(
    avatar_path="perfil.jpeg",
    audio_path="demo.ogg",
    out_path="sosi_call.mp4",
    cfg=cfg,
)

CLI usage

sosi-call --avatar perfil.jpeg --audio demo.ogg --out sosi_call.mp4

Common tweaks:

# More pixelated + faster
sosi-call --avatar perfil.jpeg --audio demo.ogg --out out.mp4 --low 180

# Less pixelated (smoother circle) but slower
sosi-call --avatar perfil.jpeg --audio demo.ogg --out out.mp4 --low 320

# More reactive ring
sosi-call --avatar perfil.jpeg --audio demo.ogg --out out.mp4 --gain 4.0 --gamma 0.45

Output and how to use it in editing

The generated video is a square MP4 with a pure black background, ideal for compositing:

  • Put it as a layer above your screen recording
  • Remove the black background using:
    • Screen/Add blend mode, or
    • Luma Key (key out dark pixels)

Configuration notes

  • size: final output (default 1080). Always square.
  • low: internal render resolution. Controls pixelation + speed.
    • 180 = very chunky + fast
    • 240 = balanced (default)
    • 320 = less jagged, slower
  • gain / gamma: controls sensitivity to voice amplitude.
    • Increase gain if it moves too little
    • Lower gamma (< 1) to amplify quieter audio

Development (uv)

uv sync
uv run python -c "from sosi_call import render_call_video; print('ok')"

Editable install:

uv pip install -e .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sosi_call-0.1.6.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sosi_call-0.1.6-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file sosi_call-0.1.6.tar.gz.

File metadata

  • Download URL: sosi_call-0.1.6.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sosi_call-0.1.6.tar.gz
Algorithm Hash digest
SHA256 ed365b24f5ac5c0d3c594a9d1ac26007c63e1debbb5d5e3c5c54c895815a8578
MD5 1b9834e8d455f8c9b1a809a07e1ba4b6
BLAKE2b-256 7e3294e145e722e0932e22ccab554e2b9ce74608b8b09a2817e65a58c1076a80

See more details on using hashes here.

File details

Details for the file sosi_call-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: sosi_call-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sosi_call-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7cb93b769ebf80d45bf7704baf4b934fc38297f977734ee324fe4efa5db4b556
MD5 70a6a3e873f44086e0b9a51e6563ab1e
BLAKE2b-256 95c8fd59e7dc6d795144af98add8d975db49dd34aa9f7a49be03f1dc13f7c7f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page