Network Customization and Accessibility#

Audio2Face Docker-Compose Customization#

If you decide not to use host as network and you would like to specify ports then you need to update Audio2Face and A2F Controller configuration files.

For Audio2Face, the ip of the A2F Controller (grpc_output/ip) must be a2f-controller instead of 0.0.0.0.

For A2F-Controller, the ip of Audio2Face (audio2face/send-audio/ip) must be a2f-service instead of 0.0.0.0.

These 2 names are part of the docker-compose.yml file.

Ports must be set accordingly to your changes.

If you open the 2 default config files next to each other you will see port 50000 of Audio2Face (server) corresponding to the port 50000 of A2F-Controller (client). Similarly, the port 51000 of Audio2Face (client) corresponds to the port 51000 of A2F-Controller (server).

The port 52000 is dedicated to clients external to the cluster.

Exposing Audio2Face Deployment from WSL#

By Default, if you try to access the Deployed Audio2Face Service in WSL, from another machine it will not work. You need to open a port in your Windows Firewall for this and to reroute traffic on port 52000 to your WSL network.

Opening a port in Windows Firewall#

Open the Windows Firewall menu:

../../../_images/firewall_1.png

Click on Advanced settings:

../../../_images/firewall_2.png

Click on Inbound rule:

../../../_images/firewall_3.png

Click on new rule and select port:

../../../_images/firewall_4.png

Select TCP and specific local ports:

../../../_images/firewall_5.png

Click on allow the connection and next:

../../../_images/firewall_6.png

Assuming this deployment is done in a workplace, let’s select Domain and Private.

../../../_images/firewall_7.png

Now let’s give a name to that rule: Audio2Face Service

../../../_images/firewall_8.png

You rule is now ready, you can close these windows:

../../../_images/firewall_9.png

Rerouting Traffic to your WSL deployment#

In a Ubuntu 22.04 WSL terminal, type the following command:

$ hostname -I

You will obtain 1 or multiple ip addresses:

<ip_address_wsl> ...

Take the first one as <ip_address_wsl>.

Then open a Powershell as Administrator and type: (make sure to replace <ip_address_wsl> by the ip you received above.)

netsh interface portproxy add v4tov4 listenport=52000 listenaddress=0.0.0.0 connectport=52000 connectaddress=<ip_address_wsl>

With these changes, you will be able to communicate with you Audio2Face Deployment on WSL.