Git Product home page Git Product logo

voicevox_core's Introduction

VOICEVOX CORE

VOICEVOX の音声合成コア。

Releases にビルド済みのコアライブラリ(.so/.dll)があります。

依存関係

CUDA 11.1CUDNN のインストールと LibTorch のダウンロードが必要です。

API

core.h をご参照ください。

サンプルの実行

まず Releases からコアライブラリが入った zip をダウンロードしておきます。

Python 3

ソースコードから実行

cd example/python

# example/python のディレクトリにコアライブラリが入った zip ファイルを展開

# Windowsの場合、DLLからLIBファイルの作成
./makelib.bat core

# 環境構築
pip install -r requirements.txt
python setup.py install  # Linuxの場合は先頭に `LIBRARY_PATH="$LIBRARY_PATH:."` が必要

# # うまく行かないときは毎回以下を実行すると良いかも
# python setup.py clean
# rm -r build *.cpp

# 実行(Windowsの場合)
PATH="$PATH:$HOME/libtorch/lib/" python run.py \
    --text "これは本当に実行できているんですか" \
    --speaker_id 1

# 実行(Windows以外の場合)
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/libtorch/lib/" python run.py \
    --text "これは本当に実行できているんですか" \
    --speaker_id 1

# 引数の紹介
# --text 読み上げるテキスト
# --speaker_id 話者ID
# --use_gpu GPUを使う
# --f0_speaker_id 音高の話者ID(デフォルト値はspeaker_id)
# --f0_correct 音高の補正値(デフォルト値は0。+-0.3くらいで結果が大きく変わります)

「ImportError: DLL load failed: 指定されたモジュールが見つかりません。」というエラーが出た場合は libtorch のパスが間違っているかもしれません。

Docker から

# イメージのビルド
docker build -t voicevox_core example/python

# コンテナの起動(音声を保存しておくボリュームを作成)
docker run -it -v ~/voicevox:/root/voice voicevox_core bash

# テスト音声 `おはようございます-1.wav` を生成
python run.py --text おはようございます --speaker_id 1
mv *.wav ~/voice
exit

# 音声の再生
aplay ~/voice/おはようございます-1.wav

その他の言語

サンプルコードを実装された際はぜひお知らせください。こちらに追記させて頂きます。

事例紹介

VOICEVOX ENGINE SHARP @yamachu ・・・ VOICEVOX ENGINE の C# 実装

ライセンス

サンプルコードおよび core.hMIT LICENSE です。

Releases にあるビルド済みのコアライブラリは別ライセンスなのでご注意ください。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.