Uma biblioteca de wrapper e servidor IPC de integração da API CEIVIO para .NET 7 / .NET Standard 2.0
Esta é uma biblioteca de wrapper e servidor de ligação que permite que a interface de ligação externa .NET do software de síntese de fala " cevi " seja usada até a mais recente .NET 7 etc. Ele estará disponível nos aplicativos .NET Outro que não .NET Framework 4.8. Ele também suporta métodos de escrita modernos, como async / await , ValueTask e nullable .
Uma biblioteca de wrapper e servidor IPC de integração para a interface de integração externa .NET do software de síntese de fala " CEVIO ", que pode ser usado no mais recente .NET 7 e outros ambientes .NET Framework 4.8. Ele também suporta um estilo moderno de escrita em C#, como async / await , ValueTask , nullable e assim por diante.
async / awaitnullableValueTask<T>.unitypackage está disponível.nupkg.unitypackage dotnet add package FluentCeVIOWrapper.Common //ファクトリメソッドで非同期生成
//IDisposableを継承しているためusingが使えます
using var fcw = await FluentCeVIO . FactoryAsync ( ) ;
//非同期でCeVIO外部連携インターフェイス起動
await fcw . StartAsync ( ) ;
//利用可能なキャスト(ボイス)を非同期で取得
var casts = await fcw . GetAvailableCastsAsync ( ) ;
//感情一覧を非同期で取得
var emotes = await fcw . GetComponentsAsync ( ) ;
var newEmo = emotes
. Select ( v => {
v . Value = ( v . Name == "哀しみ" ) ?
( uint ) 100 :
( uint ) 0 ;
return v ;
} )
. ToList ( ) ;
//メソッドチェーンでまとめてパラメータ指定
await fcw . CreateParam ( )
. Cast ( casts [ 0 ] )
. Alpha ( 30 )
. Speed ( 50 )
. ToneScale ( 75 )
. Components ( newEmo )
. SendAsync ( ) ;
//非同期で音声合成
await fcw . SpeakAsync ( "こんにちは。" ) ;
//感情設定は Emotions() で簡単にできる
await fcw . CreateParam ( )
//キャスト名の直接指定でも実はOK
. Cast ( "さとうささら" )
//感情一覧を取得しなくても使える便利関数
//感情名が一致すれば設定します。存在しない場合は無視
. Emotions ( new ( )
{
[ "元気" ] = 0 ,
[ "哀しみ" ] = 0 ,
[ "怒り" ] = 75 ,
[ "普通" ] = 50
} )
. SendAsync ( ) ;
await fcw . SpeakAsync ( "こんにちは!!" ) ;| Classe de Cevio | Nome de Cevio | Classe FCW | Nome da FCW |
|---|---|---|---|
| - | - | Fluentcevioutil | GetCastIdAsync() |
| Talker/Talker2 | Alfa | Fluentcevio | GetAlphaAsync() / SetAlphaAsync() |
| Talker/Talker2 | Alfa | Fluentcevihoparam | Alpha() |
| Talker/Talker2 | Disponíveis | Fluentcevio | GetAvailableCastsAsync() |
| Talker/Talker2 | Elenco | Fluentcevio | GetCastAsync() / SetCastAsync() |
| Talker/Talker2 | Elenco | Fluentcevihoparam | Cast() |
| ServiceControl /ServiceControl2 | CloseHost () | Fluentcevio | CloseAsync() |
| Talker/Talker2 | Componentes | Fluentcevio | GetComponentsAsync() / SetComponentsAsync() |
| Talker/Talker2 | Componentes | Fluentcevihoparam | Components() |
| Talker/Talker2 | Componentes | Fluentcevihoparam | Emotions() |
| Talker/Talker2 | Getphonemes () | Fluentcevio | GetPhonemesAsync() |
| Talker/Talker2 | GetTextDuration () | Fluentcevio | GetTextDurationAsync() |
| ServiceControl /ServiceControl2 | HostVersion | Fluentcevio | GetHostVersionAsync() |
| ServiceControl /ServiceControl2 | Ishoststarted | Fluentcevio | GetIsHostStartedAsync() |
| Talker/Talker2 | OutputWavetofile () | Fluentcevio | OutputWaveToFileAsync() |
| Talker/Talker2 | Falar() | Fluentcevio | SpeakAsync() |
| Talker/Talker2 | Falar() | Fluentcevihoparam | SendAndSpeakAsync() |
| Talker/Talker2 | Velocidade | Fluentcevio | GetSpeedAsync() / SetSpeedAsync() |
| Talker/Talker2 | Velocidade | Fluentcevihoparam | Speed() |
| ServiceControl /ServiceControl2 | Starthost () | Fluentcevio | StartAsync() |
| Talker/Talker2 | Parar() | Fluentcevio | StopAsync() |
| Talker/Talker2 | Tom | Fluentcevio | GetToneAsync() / SetToneAsync() |
| Talker/Talker2 | Tom | Fluentcevihoparam | Tone() |
| Talker/Talker2 | Tonescale | Fluentcevio | GetToneScaleAsync() / SetToneScaleAsync() |
| Talker/Talker2 | Tonescale | Fluentcevihoparam | ToneScale() |
| Talker/Talker2 | Volume | Fluentcevio | GetVolumeAsync() / SetVolumeAsync() |
| Talker/Talker2 | Volume | Fluentcevihoparam | Volume() |
Process.Start() etc.FluentCeVIOWrapper.Common.FluentCeVIO .-help : mostre ajuda-cevio : CeVIO_AI ou CeVIO_CS-pipeName : Nome de tubo nomeado usado no IPC. Defina ao iniciar várias vezes.-dllPath : especifique o caminho da pasta de instalação do CEVIOSe você deseja se comunicar com o Cevio AI e o Cevio Creative Studio ao mesmo tempo, inicie dois servidores.
Basta baixar o UnityPackage de lançamentos e importá -lo.
Veja ReadMe
Assets/Init.cs é o script de chamada real.
さとうささら) para o nome da biblioteca de voz que você já possui.MIT Licença
Copyright (c) 2022 - 2023 inu
Consulte a licença de detalhes