top of page

CeVIO AI 夏色花梨を購入

執筆者の写真: snackvirtualsnackvirtual

CeVIOとPythonの連携を検討しようとしたが、体験版が期限切れで動かないので、この際意を決して購入に踏み切る

しかし購入後に10%割引チケットがあったことが判明し、涙する

Visual StudioはCeVIO CSなのでCeVIO AI向けに一部書き直し

再生OKだが、口パクに比べて音声出力が遅い

きっと処理に時間がかかっているのだろう

(ここはもともとヨーイドン方式なので合わなくて当然)

これで動いたので、自信を持ってPythonでのインプリに進む

import win32com.client
service_control = win32com.client.Dispatch("CeVIO.Talk.RemoteService2.ServiceControl2V40")
talker2 = win32com.client.Dispatch("CeVIO.Talk.RemoteService2.Talker2V40")

def CeVIO_init():
    service_control.StartHost(False)

    #キャストを確認する
    string_array = talker2.AvailableCasts
    print([string_array.At(i) for i in range(string_array.Length)])

    #キャストを設定する
    talker2.Cast = "夏色花梨"

    #ボリュームを設定する
    talker2.Volume = 60

    #感情を確認する
    component_array = talker2.Components
    print([component_array.At(i).Name for i in range(component_array.Length)])

    return


def CeVIO_emotion_set(ureshii,futsuu,ikari,kanashimi,ochitsuki):
    #感情を設定する
    component_array = talker2.Components
    component_array.ByName("嬉しい").Value = ureshii
    component_array.ByName("普通").Value = futsuu
    component_array.ByName("怒り").Value = ikari
    component_array.ByName("哀しみ").Value = kanashimi
    component_array.ByName("落ち着き").Value = ochitsuki

    return

def CeVIO_playback(text):    
    #再生する
    text = "こんにちは"
    talker2.Speak(text)

    return

def CeVIO_phoneme_data_get(text):
#音素のデータを取得する
    phoneme_data_array = talker2.GetPhonemes(text)
    result = []
    for i in range(phoneme_data_array.Length):
        phoneme_data = phoneme_data_array.At(i)
        result.append((phoneme_data.StartTime, phoneme_data.EndTime, phoneme_data.Phoneme))

    print(result)

    return(result)

CeVIO_init()
CeVIO_emotion_set(100,0,0,0,0)
CeVIO_phoneme_data_get("いらっしゃいませ")
CeVIO_playback("いらっしゃいませ")

動いた動いた!

閲覧数:2回0件のコメント

最新記事

すべて表示

留言


bottom of page