Metadata-Version: 2.4
Name: simple-talking_anime-avatar
Version: 0.0.5
Summary: Generate 
Project-URL: Homepage, https://github.com/snow884/simple_talking_anime_avatar
Project-URL: Bug Tracker, https://github.com/snow884/simple_talking_anime_avatar/issues
Author-email: Adam Ivansky <adam.ivansky@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: librosa>=0.10.0
Requires-Dist: moviepy>=2.0.0
Requires-Dist: numpy<2.0.0,>=1.20.0
Requires-Dist: opencv-python>=4.0.0.21
Requires-Dist: whisper-timestamped>=1.15.8
Requires-Dist: whisper>=1.1.10
Description-Content-Type: text/markdown

# simple_talking_anime_avatar
Simple python package to generate talking anime avatar video.

![Talking avatar example](speaking_avatar_example.gif "Speaking avatar gif")

## 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](speaking_avatar_u.png "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)
```