Skip to main content

A simple python package to generate image or video of a talking avatar based on text or audio.

Project description

simple_talking_anime_avatar

Simple python package to generate talking anime avatar video.

Talking avatar example

Installation

pip install simple_talking_anime_avatar

Usage

Here is how to use this package to generate an image of a woman pronuncing the letter 'u'

import cv2

from src.simple_talking_anime_avatar.avatar_gen import get_image_speaking

image_avatar_speaking_u = get_image_speaking("u")
cv2.imwrite("speaking_avatar_u.png", image_avatar_speaking_u)

This will generate an image looking something like this:

Pronuncing u

Here is how to generate the video at the top using the library pyttsx3. Note that pyttsx3 works differently on different systems. There is also other packages for generating speech from text.


import pyttsx3

from src.simple_talking_anime_avatar.speech_to_vid import get_speaker_video

engine = pyttsx3.init()
voices = engine.getProperty("voices")

engine.setProperty("rate", 110)

engine.setProperty("voice", "com.apple.voice.compact.en-AU.Karen")

engine.say("Hello everyone! This is a test of speaking avatar python package.")
engine.save_to_file(
    "Hello everyone! This is a test of speaking avatar python package.", "test.wav"
)
engine.runAndWait()

get_speaker_video("test.mp4", "test.wav", 30)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_talking_anime_avatar-0.0.6.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_talking_anime_avatar-0.0.6-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file simple_talking_anime_avatar-0.0.6.tar.gz.

File metadata

File hashes

Hashes for simple_talking_anime_avatar-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7c26f6012e45cc94b562285be56ea2ec55c819df82e60c627fe047a149b1a80d
MD5 d31b7b7926571d61da9ad22ab08eafd5
BLAKE2b-256 1508327608289e581dd5d1f4d33504bbda1281dd775640ffb60d2e2426928a05

See more details on using hashes here.

File details

Details for the file simple_talking_anime_avatar-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_talking_anime_avatar-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7ebe0d7494ef41ef5d456e3a1f591bebae60b39e83acc94ee543b32305de7071
MD5 17226e9b9547b7ffab3f0f0f71fd9c9c
BLAKE2b-256 e39bb31671f6b6856bb755e5f6d8c37817b16f3b95c79593f302ca102edeb9c6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page