Skip to main content

Easy and fast AI Waifu voice generation

Project description

AIwaifu Vocal Pipeline

Waifu Voice - Made Easy

an implementation of AIwaifu Vocal Pipeline to make it easier to create a fast and easy-to-use Cute Waifu Voice Text -> TTS -> Voice Conversion -> Done

Usage

# pip install aivoifu
poetry install aivoifu # Recommended using poetry
from AIvoifu import client_pipeline

model = client_pipeline.tts_pipeline(tts_model_selection='gtts', vc_model_selection='ayaka-jp', hubert_model='zomehwh-hubert-base', language='en')
model.tts('Hello This Is A Test Text Anyway', save_path='./test.wav')

How to add your own TTS/Voice Conversion pipeline

First of all we need to understand how AIwaifu Vocal Pipeline was design There's two components

  1. TTS: This is a typical text to speech model which you can add your own
  2. Voice_Conversion: This is our Heroine on making TTS sound like a cute girl by converting TTS speech using Voice Conversion which you can train easily

First of all we get TTS voice from TTS pipeline, adn the we do voice conversion on it

Custom TTS

in the TTS folder you'll found

  • tts_base_model: folder
  • tts.py

if you wish to add your own TTS model please create a class in tts.py and in the function constructor please download the weight and cache it under the tts_base_model along with other cache file

# Example code
class CustomTTS:
  def __init__(self) -> None:
    from something import tts_library
    self.model_link = 'Huggingface_link'
    root = os.path.dirname(os.path.abspath(__file__))
    self.model_root_path = f'{root}/base_tts_model/'
    self.model_name = 'custom_tts'
    model_path = f'{self.model_root_path}/{self.model_name}'
    if not os.path.exist(model_path)
      os.mkdir(model_path)
    weigh_path = f'{model_path}/{self.model_name}.pth'
    if not os.path.exist(weigh_path):
      wget.download(self.model_link, weigh_path)
    self.model = tts_library.load(weigh_path)
    print(f'model {self.model_name} initialized')

  def tts(self, text:str, save:boolean=True, your_args:any):
    # some preprocessing
    output = self.model.tts(text)
    if save:
      output.save('save_path')
    return output

Custom Voice Conversion

if you're not looking to add new language but just want to custom the model voice easily

Our recommendation is to just Train Voice Conversion pipeline on your own samples and added it to the zoo

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

aivoifu-0.2.0.tar.gz (148.8 kB view details)

Uploaded Source

Built Distribution

aivoifu-0.2.0-py3-none-any.whl (164.2 kB view details)

Uploaded Python 3

File details

Details for the file aivoifu-0.2.0.tar.gz.

File metadata

  • Download URL: aivoifu-0.2.0.tar.gz
  • Upload date:
  • Size: 148.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

File hashes

Hashes for aivoifu-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d9c5d61dd148218ae61c347a16ec5b06ff9eea873a7c78aff3fb86c87c9b1397
MD5 39c50ace7d0f86baabd33656f953d006
BLAKE2b-256 f1f8511b27645f1a5ab55e6b4a42b6ae68be7392d001302f6700a778470084c2

See more details on using hashes here.

File details

Details for the file aivoifu-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aivoifu-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 164.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

File hashes

Hashes for aivoifu-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5476ddbf4708fb89475197ae9375418a61732591f5f063314b448207efc4dc92
MD5 e07e09d7ae0409b8d277b2d89df9a645
BLAKE2b-256 3c4c77f3ac63bd270b19d195f8b1dffdefcb9148108282b53caccf3ceb9ed617

See more details on using hashes here.

Supported by

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