If you have Python 3.11 installed on your system, you will get this error when running the webui.bat file for setting up the SadTalker since it does not yet support Python 3.11. The solution is to install previous version of Python (in my case I did Python 3.8 as specified in the dependecies section of cog.yaml which downloaded with the SadTalker code). We will use conda to create a virtual environment just for SadTalker and then use it from there.
The first step is to make sure we have Anaconda installed on our system. If not then download and install it from here.
Make sure to follow the steps here for downloading the SadTalker files.
Launch Anaconda Powershell and run following command to create a new environment for older version of python.
conda create -n sadtalker python=3.8.0 anaconda
Now activate the environment
conda activate sadtalker
Make sure to validate that it is using desired version of python by checking python version
python --version
In Anaconda powershell go to the SadTalker directory which you created during the setup earlier (refer to previous article link for the same). Now run webui.bat file in the powershell as following
.\webui.bat
This will take a while to download and setup all required packages the first time. For all future launches run the same batch file and it will open quickly. Once the setup finishes, you will see a message in the command prompt with URL to run it in browser. Copy and paster the URL in your browser
Copy the URL in browser will open the SadTalker in browser as following