Genie-TTS

High-LogicMIT活跃维护

把 GPT-SoVITS 语音克隆模型转成 ONNX 并做推理的引擎,方便在没有 PyTorch 环境里跑少样本音色克隆和语音合成。

GPT-SoVITS ONNX Inference Engine & Model Converter

v2.0.2发布于 2025-12-12 08:17 UTC1,844star +4 / 7 天125fork同步于 2026-11-10 17:48 UTC

怎么上手

由 README 提炼,执行前请确认
pip install genie-tts
硬件要求按 README 说明

README 强调 CPU 推理,测试基于 i7-13620H,未提及显存或 GPU 厂商型号要求;运行体积约 200MB、模型约 230MB。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 GPT-SoVITS 转成 ONNX 的轻量推理引擎,让语音合成在 CPU 上接近即时

把 GPT-SoVITS 语音克隆模型转成 ONNX 并做推理的引擎,方便在没有 PyTorch 环境里跑少样本音色克隆和语音合成。

核心能力

  • 集成 TTS 推理、ONNX 模型转换与 FastAPI 服务
  • 支持 GPT-SoVITS V2 与 V2ProPlus 模型
  • 覆盖中英日韩四种语言合成
  • 内置预定义角色模型,首次运行自动下载
  • 提供 convert_to_onnx 转换 .pth/.ckpt 模型

容易踩的坑

首次运行需下载约 391MB 资源文件,也可手动下载后设置 GENIE_DATA_DIR 环境变量;中文韵律需额外下载 RoBERTa 资源且仅用于中文;模型转换需另行安装 torch。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

2 个版本v2.0.2
  1. v2.0.2V2.0.2 整合包 (解压即用)最新正式版2025-12-12 · 2025-12-12 08:17 UTC

    Mega网盘: https://mega.nz/file/2vQRQQKR#HxB_8tqgE5GixrZwz__KBKhEJhq50CPb4Yl3KB7Bn2g

    小白友好的 GUI 程式, 解压即用, 无需 GPU, 无需安装任何环境 建议在 Windows 10/11 运行

    支持三种语言: 中文/英文/日文 支持 GPT SoVITS V2 & V2 ProPlus 模型转换 支持批量合成语音

    预装了以下角色模型(963MB): (中文) 鸣潮-菲比 (日文) 碧蓝档案-圣园未花 (英文) 重返未来-37

  2. v1.0.2V1.0.2 整合包 (解压即用)2025-09-09 · 2025-09-09 05:34 UTC
    查看更新说明

    发布 Windows 整合包,包含:

    • Genie-TTS Command Line Client
    • API Server
    • GPT-SoVITS 模型转换界面
    • Misono Mika 语音合成器 (供快速体验)

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    🔮 GENIE: GPT-SoVITS Lightweight Inference Engine

    Experience near-instantaneous speech synthesis on your CPU

    简体中文 | English


    GENIE is a lightweight inference engine built on the open-source TTS project GPT-SoVITS. It integrates TTS inference, ONNX model conversion, API server, and other core features, aiming to provide ultimate performance and convenience.

    • ✅ Supported Model Version: GPT-SoVITS V2, V2ProPlus
    • ✅ Supported Language: Japanese, English, Chinese, Korean
    • ✅ Supported Python Version: >= 3.10

    🎬 Demo Video


    🚀 Performance Advantages

    GENIE optimizes the original model for outstanding CPU performance.

    Feature🔮 GENIEOfficial PyTorch ModelOfficial ONNX Model
    First Inference Latency1.13s1.35s3.57s
    Runtime Size~200MB~several GBSimilar to GENIE
    Model Size~230MBSimilar to GENIE~750MB

    📝 Latency Test Info: All latency data is based on a test set of 100 Japanese sentences (~20 characters each), averaged. Tested on CPU i7-13620H.


    🏁 QuickStart

    ⚠️ Important: It is recommended to run GENIE in Administrator mode to avoid potential performance degradation.

    📦 Installation

    Install via pip:

    pip install genie-tts
    

    📥 Pretrained Models

    When running GENIE for the first time, it requires downloading resource files (~391MB). You can follow the library's prompts to download them automatically.

    Alternatively, you can manually download the files from HuggingFace and place them in a local folder. Then set the GENIE_DATA_DIR environment variable before importing the library:

    import os
    
    # Set the path to your manually downloaded resource files
    # Note: Do this BEFORE importing genie_tts
    os.environ["GENIE_DATA_DIR"] = r"C:\path\to\your\GenieData"
    
    import genie_tts as genie
    
    # The library will now load resources from the specified directory
    

    If you want the optional Chinese RoBERTa text features used only for Chinese inference to improve Chinese prosody, you can also download them with:

    import genie_tts as genie
    
    # Download only the optional Chinese RoBERTa assets
    genie.download_roberta_data()
    
    # Or use the built-in full resource download flow,
    # which now also downloads the optional Chinese RoBERTa assets
    genie.download_genie_data()
    

    These RoBERTa features are intended only for the Chinese path to improve Chinese prosody. They should not be used for non-Chinese inference (Japanese / English / Korean).

    ⚡️ Quick Tryout

    No GPT-SoVITS model yet? No problem! GENIE includes several predefined speaker characters you can use immediately — for example:

    • Mika (聖園ミカ) — Blue Archive (Japanese)
    • ThirtySeven (37) — Reverse: 1999 (English)
    • Feibi (菲比) — Wuthering Waves (Chinese)

    You can browse all available characters here: https://huggingface.co/High-Logic/Genie/tree/main/CharacterModels

    Try it out with the example below:

    import genie_tts as genie
    import time
    
    # Automatically downloads required files on first run
    genie.load_predefined_character('mika')
    
    genie.tts(
        character_name='mika',
        text='どうしようかな……やっぱりやりたいかも……!',
        play=True,  # Play the generated audio directly
    )
    
    genie.wait_for_playback_done()  # Ensure audio playback completes
    

    🎤 TTS Best Practices

    A simple TTS inference example:

    import genie_tts as genie
    
    # Step 1: Load character voice model
    genie.load_character(
        character_name='<CHARACTER_NAME>',  # Replace with your character name
        onnx_model_dir=r"<PATH_TO_CHARACTER_ONNX_MODEL_DIR>",  # Folder containing ONNX model
        language='<LANGUAGE_CODE>',  # Replace with language code, e.g., 'en', 'zh', 'jp', 'kr'
    )
    
    # Step 2: Set reference audio (for emotion and intonation cloning)
    genie.set_reference_audio(
        character_name='<CHARACTER_NAME>',  # Must match loaded character name
        audio_path=r"<PATH_TO_REFERENCE_AUDIO>",  # Path to reference audio
        audio_text="<REFERENCE_AUDIO_TEXT>",  # Corresponding text
    )
    
    # Step 3: Run TTS inference and generate audio
    genie.tts(
        character_name='<CHARACTER_NAME>',  # Must match loaded character
        text="<TEXT_TO_SYNTHESIZE>",  # Text to synthesize
        play=True,  # Play audio directly
        save_path="<OUTPUT_AUDIO_PATH>",  # Output audio file path
    )
    
    genie.wait_for_playback_done()  # Ensure audio playback completes
    
    print("🎉 Audio generation complete!")
    

    🔧 Model Conversion

    To convert original GPT-SoVITS models for GENIE, ensure torch is installed:

    pip install torch
    

    Use the built-in conversion tool:

    Tip: convert_to_onnx currently supports V2 and V2ProPlus models.

    import genie_tts as genie
    
    genie.convert_to_onnx(
        torch_pth_path=r"<YOUR .PTH MODEL FILE>",  # Replace with your .pth file
        torch_ckpt_path=r"<YOUR .CKPT CHECKPOINT FILE>",  # Replace with your .ckpt file
        output_dir=r"<ONNX MODEL OUTPUT DIRECTORY>"  # Directory to save ONNX model
    )
    

    🌐 Launch FastAPI Server

    GENIE includes a lightweight FastAPI server:

    import genie_tts as genie
    
    # Start server
    genie.start_server(
        host="0.0.0.0",  # Host address
        port=8000,  # Port
        workers=1  # Number of workers
    )
    

    For request formats and API details, see our API Server Tutorial.


    📝 Roadmap

    • 🌐 Language Expansion

      • Add support for Chinese and English.
    • 🚀 Model Compatibility

      • Support for V2ProPlus.
      • Support for V3, V4, and more.
    • 📦 Easy Deployment

      • Release Official Docker images.
      • Provide out-of-the-box Windows bundles.