-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add a Avatar Chatbot (Audio) example #523
Conversation
Signed-off-by: Chun Tao <[email protected]>
…Examples into ctao/AvatarChatbot Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: Chun Tao <[email protected]>
…Examples into ctao/AvatarChatbot Signed-off-by: Chun Tao <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: Chun Tao <[email protected]>
…Examples into ctao/AvatarChatbot
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
Signed-off-by: Chun Tao <[email protected]>
for more information, see https://pre-commit.ci
Hi @ctao456 , thanks for contribution. The talking avatar with Wav2Lip-GFPGAN looks good. Before reviewing I have a few questions. I notice that you use HPU to run Wav2Lip and report the latency "10-50 seconds for AvatarAnimation on Gaudi". How long is the driven audio? Is that the latency of the first run or after a warmup? Have you tried to optimize the related models (Wav2Lip model, GFPGAN) on HPU? With optimization it could be faster by fully utilizing the static shape feature on Gaudi. |
Hi @Spycsh thank you for your comments.
|
Signed-off-by: Chun Tao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. minor feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. leave some comments
outputs=[video_output, video_time_text], | ||
) | ||
|
||
demo.queue().launch(server_name="0.0.0.0", server_port=65535) # demo port is 65535 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to make server name and port as variables in the beginning. doesn't hurt to make them as env variables.
# Prepare 3 image paths | ||
# HOME = os.getenv("HOME") | ||
# HOME="/mnt/localdisk4" | ||
HOME = "/home/demo/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might need to make "HOME" configurable via env or parameter
asyncio.set_event_loop(loop) | ||
audio_file = loop.run_until_complete(aiavatar_demo(audio)) | ||
count += 1 | ||
end_time = time.time() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the latency, we might need to support statistics RESTful API in the end.
outputs=[video_output, video_time_text], | ||
) | ||
|
||
demo.queue().launch(server_name="0.0.0.0", server_port=7861) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good to make server name and port as env variables.
# 2. Run inference.sh bash script to perform Wav2Lip+GFPGAN inference | ||
# Output video is saved at the path 'OUTFILE' | ||
command_wav2lip_gfpgan = "bash inference_vars.sh" | ||
subprocess.run(command_wav2lip_gfpgan, shell=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protentially might have issue from Intel IP scan..
Signed-off-by: letonghan <[email protected]>
Description
Initiate Avatar Chatbot (Audio) example
Issues
opea-project/docs#59
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
Wav2Lip-GFPGAN
Appending "animation" microservice to AudioQnA example, to make a new avatar chatbot example
opea-project/GenAIComps#400
Tests
curl http://${host_ip}:3009/v1/avatarchatbot
-X POST
-d @sample_whoareyou.json
-H 'Content-Type: application/json'
If the megaservice is running properly, you should see the following output:
"/outputs/result.mp4"