バージョン
menu
このセクションには、特定のゲームエンジンインテグレーションのシナリオにおける追加の手順が記載されています。
In addition to the speechEngine plug-in library, voices dynamic libraries are required at
runtime such as vt_eng.dll
or vt_fre.dll
for English and
French on Windows.
必要なライブラリをビルド時にコピーするには、Unityプロジェクト内の以下のディレクトリにあるUnity Editorヘルパースクリプトをご使用ください:SDK/Plugins/speechEngine/Unity/Editor/SpeechEnginePluginImporterScript.cs
Any text you send at runtime must use UTF-8 character encoding. Depending on the platform, you might have to convert text from a different type of encoding to UTF-8. The following code samples for Unity and Unreal demonstrate how to convert UTF-16 encoding (the default on Windows) to UTF-8. You might have to modify the code for other platforms depending on the type of encoding they use.
Unity:
public byte[] ConvertUtf16ToUtf8Bytes(string utf16String) { // Get the UTF-8 encoding Encoding utf8 = Encoding.UTF8; // Convert the UTF-16 string to a UTF-8 byte array byte[] utf8Bytes = utf8.GetBytes(utf16String); return utf8Bytes; } byte[] textArray = ConvertUtf16ToUtf8Bytes(Text); System.Runtime.InteropServices.GCHandle pinned = System.Runtime.InteropServices.GCHandle.Alloc(textArray, System.Runtime.InteropServices.GCHandleType.Pinned); IntPtr address = pinned.AddrOfPinnedObject(); AkUnitySoundEngine.SendPluginCustomGameData(0, this.gameObject, AkPluginType.AkPluginTypeSource, 312, 1, address, (uint)textArray.Length + 1); pinned.Free();
Unreal:
FString utf16_text = TEXT("This is a UTF-16 string at its core."); FStringView fStringView(utf16_text); auto ConvertedTemp = StringCast<UTF8CHAR>(fStringView.GetData(), fStringView.Len()); auto utf8_text = ConvertedTemp.Get(); SoundEngine->SendPluginCustomGameData(0, 100, AkPluginTypeSource, 312, 1, utf8_text, ConvertedTemp.Length() + 1);
speechEngineプラグインはMacプラットフォームに対応していません。しかしWwise UnrealまたはUnity IntegrationでSoundBankを生成すると、SoundBankがMac向けに自動的に生成されるため、エラーが発生する場合があります。そこで、そのようなエラーを回避するため、Macに関してすべてのspeechEngine要素をWwiseプロジェクトから明示的に除外することが推奨されます。詳細についてはExcluding project elements from a platformをご覧ください。
IntegrationDemoのspeechEngineプラグインページをコンパイルするには、Wwise SDKに含まれるXcodeプロジェクトを変更する必要があります。
IntegrationDemoのXcodeプロパティで以下を行います。
General - Frameworks, Libraries and Embedded Content下に:
Applications/Audiokinetic/Wwise[version]/SDK/iOS_Xcode[version]/[configuration]/bin
にあるすべてのvt_[lang]_q22.framework
ファイルを追加します。
Build Settings下で:
Runpath Search Paths
に@executable_path/Frameworks
を追加します。
Framework Search Paths
に../../../iOS_Xcode$(XCODE_VERSION_MAJOR)/Profile$(EFFECTIVE_PLATFORM_NAME)/bin
を追加します。