Skip to main content

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(
		"http://storage.googleapis.com/ailia-models/misc/reference_audio_girl.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

Metadata

Release files for ailia-voice 1.5.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ailia-voice 1.5.2.0
File Size Uploaded Provenance Actions
ailia_voice-1.5.2.0.tar.gz 3.1 MB Without provenance Details for ailia_voice-1.5.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ailia-voice 1.5.2.0
File Interpreter ABI Platform Actions
ailia_voice-1.5.2.0-py3-none-any.whl Python 3 none any Details for ailia_voice-1.5.2.0-py3-none-any.whl

Total release size: 6.1 MB

Release files / ailia_voice-1.5.2.0.tar.gz

Download URL ailia_voice-1.5.2.0.tar.gz
Size 3.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a24a052dab5ac9dacc1e5fd99dfb57b4aa51e22279dc07bee9fb357495053a91
BLAKE2b-256 checksum
How to use checksums
c182ff89af3780b505b1b064c414bc6554de7c7036af02a914f7be64e774a5f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.13

Release files / ailia_voice-1.5.2.0-py3-none-any.whl

Download URL ailia_voice-1.5.2.0-py3-none-any.whl
Size 3.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
5f0bf9ca324df6ee7cf4602880ed7584cc54d6a62b558df59f628a641b05b7c4
BLAKE2b-256 checksum
How to use checksums
fcd0738357225114839a11ec3bd22bc6621b522ae96b39f1d2a3647c69fe7b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.13

Security for ailia-voice 1.5.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page