Sample application connecting to A2F Controller
A sample application is provided to demonstrate how to communicate with the Audio2Face microservices. This python application will interact with A2F controller.
Assumptions
The Audio2Face and Audio2Face Controller Microservices are up and running.
Sending an audio clip
Clone the repository: https://github.com/NVIDIA/ACE
Follow the instructions in the above link to set up the specified environments.
Go to microservices/audio_2_face_microservice/scripts/audio2face_microservices_interaction_app subfolder.
And follow the setup instructions in the README.md
.
This sample python application can be used as follows:
$ ./a2f.py --help
$ ./a2f.py <audio_file.wav> <config.yml> -u <ip>:<port>
For example,
$ ./a2f.py audio.wav config_mark_v2.yml -u 127.0.0.1:52000
The script requires two parameters: an audio file in PCM 16-bit format and a YAML configuration file containing emotion parameters.
Additionally, it accepts a
-u
parameter for the A2F Controller URL. For quick start deployment, use127.0.0.1:52000
.To test the script, you’ll need to provide an audio file.
Results
This will produce a folder in which 5 files are available:
$ ls -l 20240410_120000
-rw-rw-r-- 1 user user 1733 Apr 10 12:00 a2e_emotion_output.csv
-rw-rw-r-- 1 user user 466 Apr 10 12:00 a2f_input_emotions.csv
-rw-rw-r-- 1 user user 17702 Apr 10 12:00 a2f_smoothed_emotion_output.csv
-rw-rw-r-- 1 user user 76219 Apr 10 12:00 animation_frames.csv
-rw-rw-r-- 1 user user 133368 Apr 10 12:00 out.wav
out.wav: contains the audio received
animation_frames.csv: contains the blendshapes
a2f_input_emotions.csv: contains the emotions provided as input in the gRPC protocol
a2e_emotion_output.csv: contains a blend of a2f_input_emotions and emotions inferred by Audio2Emotion
a2f_smoothed_emotion_output.csv: contains the emotions of a2e_emotion_output smoothed over time