{"id":829,"date":"2024-08-02T08:42:22","date_gmt":"2024-08-02T08:42:22","guid":{"rendered":"https:\/\/zahiralam.com\/blog\/?p=829"},"modified":"2024-10-17T13:55:58","modified_gmt":"2024-10-17T13:55:58","slug":"transform-photos-into-talking-avatars-free-open-source-echomimic-on-ubuntu-24-04-lts","status":"publish","type":"post","link":"https:\/\/zahiralam.com\/blog\/transform-photos-into-talking-avatars-free-open-source-echomimic-on-ubuntu-24-04-lts\/","title":{"rendered":"Transform Photos into Talking Avatars: Free, Open-Source EchoMimic on Ubuntu 24.04 LTS"},"content":{"rendered":"\n<p><strong>Imagine bringing your favorite photos to life and making them talk!<\/strong> EchoMimic, a free and open-source tool, empowers you to do just that. It uses the magic of deep learning to create stunning audio-driven animations from your static images. This guide will walk you through installing and setting up EchoMimic on Ubuntu 24.04 LTS, allowing you to create your own talking avatars.\n\n\n\n<h3 class=\"wp-block-heading\">Prerequisites<\/h3>\n\n\n\n<p>Before diving into the installation, ensure you have the following:\n\n\n\n<ul class=\"wp-block-list\">\n<li>An Ubuntu 24.04 LTS system<\/li>\n\n\n\n<li>Basic knowledge of terminal commands<\/li>\n\n\n\n<li>Conda for managing Python environments (check this article for installation steps: <a href=\"https:\/\/zahiralam.com\/blog\/conda-installation-on-ubuntu-simplified-step-by-step-instructions-with-activation-and-deactivation\/\">Conda Installation on Ubuntu<\/a>)<\/li>\n<\/ul>\n\n\n\n<p>\n\n\n\n<h3 class=\"wp-block-heading\">Step-by-Step Installation<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Install System Dependencies<\/h4>\n\n\n\n<p>Open your terminal and update your package list:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-1\">sudo apt update\nsudo apt upgrade<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#sudo%20apt%20update%0Asudo%20apt%20upgrade\">\n                            <button class=\"copy-button\" data-label=\"sudo apt update\nsudo apt upgrade\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">2. Install Git<\/h4>\n\n\n\n<p>Ensure Git is installed to clone the EchoMimic repository:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-2\">sudo apt install git<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#sudo%20apt%20install%20git\">\n                            <button class=\"copy-button\" data-label=\"sudo apt install git\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">3. Clone the EchoMimic Repository<\/h4>\n\n\n\n<p>Clone the EchoMimic repository from GitHub:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-3\">git clone https:\/\/github.com\/BadToBest\/EchoMimic\ncd EchoMimic<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#git%20clone%20https%3A%2F%2Fgithub.com%2FBadToBest%2FEchoMimic%0Acd%20EchoMimic\">\n                            <button class=\"copy-button\" data-label=\"git clone https:\/\/github.com\/BadToBest\/EchoMimic\ncd EchoMimic\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">4. Set Up Python Environment with Conda<\/h4>\n\n\n\n<p>Create and activate a new conda environment:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-4\">conda create -n echomimic python=3.8\nconda activate echomimic<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#conda%20create%20-n%20echomimic%20python%3D3.8%0Aconda%20activate%20echomimic\">\n                            <button class=\"copy-button\" data-label=\"conda create -n echomimic python=3.8\nconda activate echomimic\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">5. Install Python Packages<\/h4>\n\n\n\n<p>Install the required Python packages using pip:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-5\">pip install -r requirements.txt<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#pip%20install%20-r%20requirements.txt\">\n                            <button class=\"copy-button\" data-label=\"pip install -r requirements.txt\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">6. Install ffmpeg (if not already installed)<\/h4>\n\n\n\n<p>To install <code>ffmpeg<\/code>, use the following commands:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-6\">sudo apt update\nsudo apt install ffmpeg<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#sudo%20apt%20update%0Asudo%20apt%20install%20ffmpeg\">\n                            <button class=\"copy-button\" data-label=\"sudo apt update\nsudo apt install ffmpeg\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>Verify the installation:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-7\">ffmpeg -version<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#ffmpeg%20-version\">\n                            <button class=\"copy-button\" data-label=\"ffmpeg -version\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>Set the <code>FFMPEG_PATH<\/code> environment variable which is returned from <code>ffmpeg -version<\/code> command:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-8\">export FFMPEG_PATH=\/usr\/bin\/ffmpeg<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#export%20FFMPEG_PATH%3D%2Fusr%2Fbin%2Fffmpeg\">\n                            <button class=\"copy-button\" data-label=\"export FFMPEG_PATH=\/usr\/bin\/ffmpeg\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>In my case <code>ffmpeg -version<\/code> command has returned &#8216;\/usr\/bin\/ffmpeg&#8217; \n\n\n\n<h4 class=\"wp-block-heading\">7. Install Git LFS and Download Pretrained Weights<\/h4>\n\n\n\n<p>Install Git LFS and clone the pretrained weights.\n\n\n\n<p>Download and install Git LFS:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-9\">wget https:\/\/github.com\/git-lfs\/git-lfs\/releases\/download\/v3.5.1\/git-lfs-linux-amd64-v3.5.1.tar.gz\ntar -zxvf git-lfs-linux-amd64-v3.5.1.tar.gz\nbash git-lfs-3.5.1\/install.sh<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#wget%20https%3A%2F%2Fgithub.com%2Fgit-lfs%2Fgit-lfs%2Freleases%2Fdownload%2Fv3.5.1%2Fgit-lfs-linux-amd64-v3.5.1.tar.gz%0Atar%20-zxvf%20git-lfs-linux-amd64-v3.5.1.tar.gz%0Abash%20git-lfs-3.5.1%2Finstall.sh\">\n                            <button class=\"copy-button\" data-label=\"wget https:\/\/github.com\/git-lfs\/git-lfs\/releases\/download\/v3.5.1\/git-lfs-linux-amd64-v3.5.1.tar.gz\ntar -zxvf git-lfs-linux-amd64-v3.5.1.tar.gz\nbash git-lfs-3.5.1\/install.sh\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>Configure Git LFS and download models:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-10\">git lfs install\ngit clone https:\/\/huggingface.co\/BadToBest\/EchoMimic pretrained_weights<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#git%20lfs%20install%0Agit%20clone%20https%3A%2F%2Fhuggingface.co%2FBadToBest%2FEchoMimic%20pretrained_weights\">\n                            <button class=\"copy-button\" data-label=\"git lfs install\ngit clone https:\/\/huggingface.co\/BadToBest\/EchoMimic pretrained_weights\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<p>Clean up:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-11\">rm -r git-lfs-3.5.1<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#rm%20-r%20git-lfs-3.5.1\">\n                            <button class=\"copy-button\" data-label=\"rm -r git-lfs-3.5.1\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h4 class=\"wp-block-heading\">8. Run EchoMimic<\/h4>\n\n\n\n<p>Run the Gradio UI to start using EchoMimic:\n\n\n\n<div class=\"code-block-container\">\n                        <pre class=\"wp-block-code\"><code id=\"code-12\">python -u webgui.py --server_port=3000<\/code><\/pre>\n                        <amp-iframe sandbox=\"allow-scripts\" width=\"94\" height=\"72\" frameborder=\"0\" \n                                    src=\"https:\/\/zahiralam.com\/blog\/wp-content\/plugins\/amp-copy-code-button\/copier.html#python%20-u%20webgui.py%20--server_port%3D3000\">\n                            <button class=\"copy-button\" data-label=\"python -u webgui.py --server_port=3000\"  placeholder disabled>Copy<\/button>\n                        <\/amp-iframe>\n                    <\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Using EchoMimic<\/h3>\n\n\n\n<p>With EchoMimic up and running, you can now create talking avatars by uploading images and providing audio files through the Gradio UI. Customize your configurations by editing the <code><strong>.\/configs\/prompts\/animation.yaml<\/strong><\/code> file to tailor the outputs to your needs.\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p><strong>EchoMimic<\/strong>&nbsp;is a powerful tool for creating engaging, talking avatars from static images. By following this guide, you can easily set it up on Ubuntu 24.04 LTS and start exploring its capabilities.\n\n\n\n<p>If you&#8217;re looking to create\u00a0<strong>4K, long-duration talking videos<\/strong>, you might also want to check out my tutorial on\u00a0<a href=\"https:\/\/zahiralam.com\/blog\/bring-images-to-life-install-hallo2-on-ubuntu-for-4k-long-duration-talking-videos\/\">installing Hallo 2<\/a>, a more advanced tool designed for high-quality, extended animations.\n\n\n\n<p>Enjoy transforming your photos into dynamic, audio-driven animations!\n","protected":false},"excerpt":{"rendered":"<p>Imagine bringing your favorite photos to life and making them talk! EchoMimic, a free and open-source tool, empowers you to do just that. It uses [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":841,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[220,221,66],"class_list":["post-829","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence","tag-echomimic","tag-talking-avatars","tag-ubuntu-24-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/829","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/comments?post=829"}],"version-history":[{"count":11,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/829\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/posts\/829\/revisions\/1309"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media\/841"}],"wp:attachment":[{"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/media?parent=829"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/categories?post=829"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zahiralam.com\/blog\/wp-json\/wp\/v2\/tags?post=829"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}