How oussama-sil/audio2face_api works
Project type and purpose
• This is a Python client library (an open-source tool) that wraps NVIDIA’s Audio2Face Headless Mode API.
• It provides two operational modes:
• Direct Mode: sends whole audio files via HTTP and exports blendshapes to JSON.
• Stream Mode: streams audio chunks via gRPC, optionally captures frames via the LiveLink plugin.
File structure
• Top-level:
• pyproject.toml / setup: package metadata and dependencies
• assets/: sample audio and USD scene files used by tests
• src/audio2face_api/: main library code
• tests/: integration tests showing typical usage
• In src/audio2face_api/ you have:
• A2F.py and A2F_CONFIG.py: classes and config for Audio2Face (Direct & Stream)
• A2E.py and A2E_CONFIG.py: emotion‐control submodule
• Buffer.py: audio chunk buffer logic for streaming
• LiveLink.py: handling the LiveLink plugin callbacks
• grpc/: protocol definitions (audio2face.proto) and generated client stubs
• http_client.py: HTTP client for Direct mode
README for additional insights
• The README shows how user code instantiates either Audio2FaceDirect or Audio2FaceStream, configures emotion settings, and either exports JSON or streams audio and collects frames.
• It mentions two external endpoints: HTTP API (e.g. http://localhost:8011) and gRPC server (e.g. localhost:50051).