Skip to main content

ailia AI Voice

Project description

ailia AI Voice Python API

!! CAUTION !! “ailia” IS NOT OPEN SOURCE SOFTWARE (OSS). As long as user complies with the conditions stated in License Document, user may use the Software for free of charge, but the Software is basically paid software.

About ailia AI Voice

ailia AI Voice is a library for speech synthesis using AI. It provides APIs for C# for Unity and for C for native applications. By using ailia AI Voice, it is possible to easily implement AI-based speech synthesis in applications.

ailia AI Voice can perform speech synthesis offline, only on edge devices, without the need for cloud connectivity. It also supports the latest GPT-SoVITS, enabling speech synthesis in any voice timbre.

Install from pip

You can install the ailia AI Voice free evaluation package with the following command.

pip3 install ailia_voice

Install from package

You can install the ailia AI Voice from Package with the following command.

python3 bootstrap.py
pip3 install ./

Usage

import ailia_voice

import librosa
import time
import soundfile

import os
import urllib.request

# Load reference audio
ref_text = "水をマレーシアから買わなくてはならない。"
ref_file_path = "reference_audio_girl.wav"
if not os.path.exists(ref_file_path):
	urllib.request.urlretrieve(
		"https://github.com/ailia-ai/ailia-models/raw/refs/heads/master/audio_processing/gpt-sovits/reference_audio_captured_by_ax.wav",
		"reference_audio_girl.wav"
	)
audio_waveform, sampling_rate = librosa.load(ref_file_path, mono=True)

# Infer
voice = ailia_voice.GPTSoVITS()
voice.initialize_model(model_path = "./models/")
voice.set_reference_audio(ref_text, ailia_voice.AILIA_VOICE_G2P_TYPE_GPT_SOVITS_JA, audio_waveform, sampling_rate)
buf, sampling_rate = voice.synthesize_voice("こんにちは。今日はいい天気ですね。", ailia_voice.AILIA_VOICE_G2P_TYPE_GPT_SOVITS_JA)
#buf, sampling_rate = voice.synthesize_voice("Hello world.", ailia_voice.AILIA_VOICE_G2P_TYPE_GPT_SOVITS_EN)

# Save result
soundfile.write("output.wav", buf, sampling_rate)

User dictionary

To load a user dictionary created with pyopenjtalk, give the user_dict_path to initialize_model.

voice.initialize_model(model_path = "./models/", user_dict_path = "./userdic.dic")

API specification

https://github.com/ailia-ai/ailia-sdk

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

ailia_voice-1.5.1.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

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

ailia_voice-1.5.1.0-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

Details for the file ailia_voice-1.5.1.0.tar.gz.

File metadata

  • Download URL: ailia_voice-1.5.1.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.13

File hashes

Hashes for ailia_voice-1.5.1.0.tar.gz
Algorithm Hash digest
SHA256 70081f4e0a76f3df4c87277273f9133d9cfcb3bd1c3a614dc1ab6c72b52cd8f8
MD5 88a4c2040db843f458d723a16e4e5f3a
BLAKE2b-256 6dad4dfc9141f07dd3830f1dd26a00b3d3e022046255355dd595588f04ef031c

See more details on using hashes here.

File details

Details for the file ailia_voice-1.5.1.0-py3-none-any.whl.

File metadata

  • Download URL: ailia_voice-1.5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.13

File hashes

Hashes for ailia_voice-1.5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adef8230f2e1c492c4fd1f88cdcb82c069a289e178591a9cd38e274b8655b44b
MD5 83a43a970497da9278389a63011ff468
BLAKE2b-256 614646df66029e9f432bafbca594e880c8a571f488db75ffaf303f516b2163b8

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