A.I.VOICE Python Library
A Python wrapper for A.I.VOICE Editor API that makes it easy to control A.I.VOICE Editor from Python.
Features
✨ Easy to use: Simple Python interface for A.I.VOICE Editor API
🎵 Voice synthesis: Generate speech from text using A.I.VOICE voices
🔧 Full control: Access to all A.I.VOICE Editor functions
🛡️ Type safety: Full type hints for better development experience
Requirements
- Windows OS
- A.I.VOICE Editor (v1.3.0 or later)
- Python 3.8+
- pythonnet
Installation
pip install aivoice-python
Quick Start
import time
from aivoice_python import AIVoiceTTsControl, HostStatus
# Create A.I.VOICE controller (using default installation path)
tts_control = AIVoiceTTsControl()
# Or specify custom installation path:
# tts_control = AIVoiceTTsControl(editor_dir="C:\\MyPath\\AIVoice\\AIVoiceEditor\\")
# Initialize API
host_name = tts_control.get_available_host_names()[0]
tts_control.initialize(host_name)
# Start A.I.VOICE Editor if not running
if tts_control.status == HostStatus.NotRunning:
tts_control.start_host()
# Connect to A.I.VOICE Editor
tts_control.connect()
# Set text and play
tts_control.text = "Hello, A.I.VOICE!"
play_time = tts_control.get_play_time()
tts_control.play()
# Wait for playback to complete
time.sleep((play_time + 500) / 1000)
# Disconnect
tts_control.disconnect()
API Reference
AIVoiceTTsControl
Main class for controlling A.I.VOICE Editor.
Constructor
AIVoiceTTsControl(editor_dir: str = None)- Create controller instanceeditor_dir: Custom A.I.VOICE Editor installation path (optional)
Properties
text: str- Text to synthesizecurrent_voice_preset_name: str- Current voice preset namevoice_names: List[str]- Available voice namesvoice_preset_names: List[str]- Available voice preset namesstatus: HostStatus- Current host statusversion: str- Host version
Methods
initialize(service_name: str)- Initialize APIconnect()- Connect to A.I.VOICE Editordisconnect()- Disconnect from A.I.VOICE Editorstart_host()- Start A.I.VOICE Editorplay()- Start/pause playbackstop()- Stop playbackget_play_time() -> int- Get playback duration in millisecondssave_audio_to_file(path: str)- Save audio to file
Enums
HostStatus
NotRunning- A.I.VOICE Editor is not runningNotConnected- Not connected to A.I.VOICE EditorIdle- Connected and idleBusy- Connected and busy
TextEditMode
Text- Text modeList- List mode
Examples
Custom Installation Path
If A.I.VOICE Editor is installed in a non-standard location:
from aivoice_python import AIVoiceTTsControl
# Specify custom installation path
tts_control = AIVoiceTTsControl(editor_dir="D:\\MyApps\\AIVoice\\AIVoiceEditor\\")
# ... rest of the code ...
Save Audio to File
from aivoice_python import AIVoiceTTsControl
tts_control = AIVoiceTTsControl()
# ... initialization code ...
tts_control.text = "Hello, World!"
tts_control.save_audio_to_file("output.wav")
Use Different Voice
from aivoice_python import AIVoiceTTsControl
tts_control = AIVoiceTTsControl()
# ... initialization code ...
# Get available voices
voices = tts_control.voice_names
print(f"Available voices: {voices}")
# Set voice
if voices:
tts_control.current_voice_preset_name = voices[1] # Use second voice
Error Handling
from aivoice_python import AIVoiceTTsControl
try:
tts_control = AIVoiceTTsControl()
except FileNotFoundError as e:
print(f"A.I.VOICE Editor not found: {e}")
# Try with custom path
try:
tts_control = AIVoiceTTsControl(editor_dir="C:\\MyPath\\AIVoice\\AIVoiceEditor\\")
except FileNotFoundError:
print("Please install A.I.VOICE Editor v1.3.0 or later.")
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
If you encounter any issues, please create an issue on the GitHub repository.
Metadata
Release files for aivoice-python 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| aivoice_python-0.1.6.tar.gz | 14.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aivoice_python-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.5 kB
Release files / aivoice_python-0.1.6.tar.gz
| Download URL | aivoice_python-0.1.6.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27a17ddf091fd342fe4d60a3b3923db45aa95b37dc38485af54e4397debf77e0
|
|
BLAKE2b-256 checksum How to use checksums |
fdd115d871b2159a2e648220802fbceecbfe6df0341c8b2fb602b09d099fe47c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.12.3 HTTPX/0.28.1
|
Release files / aivoice_python-0.1.6-py3-none-any.whl
| Download URL | aivoice_python-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7fa6689d52048d526bcc656fc7982420720f0400545d2ec0cb9565b0c2ec4943
|
|
BLAKE2b-256 checksum How to use checksums |
2e300ef1317b7d9effbd32cd6228953d24a818db705e9c91eb26b098147eb539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.3 cpython/3.12.3 HTTPX/0.28.1
|
Security for aivoice-python 0.1.6
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.