Browse Source

Removed redundant enum for openai voice, remvoed vectors from search request, changed to openai realtime tts, added mew openai voices, changed defaults

master
Tillman Staffen 3 days ago
parent
commit
7e55240330
  1. BIN
      Unreal/Content/Project/BP/BP_Project_Manager.uasset
  2. BIN
      Unreal/Content/Project/BP/Base/UEC_AzureAISearch.uasset
  3. BIN
      Unreal/Content/Project/BP/EnumsAndStructs/S_ConfigSettings.uasset
  4. 58
      Unreal/Content/Schema/Spie_Config.schema.json
  5. 12
      Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h
  6. 10
      Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/RealtimeAPIConfig.h

BIN
Unreal/Content/Project/BP/BP_Project_Manager.uasset

Binary file not shown.

BIN
Unreal/Content/Project/BP/Base/UEC_AzureAISearch.uasset

Binary file not shown.

BIN
Unreal/Content/Project/BP/EnumsAndStructs/S_ConfigSettings.uasset

Binary file not shown.

58
Unreal/Content/Schema/Spie_Config.schema.json

@ -4,7 +4,10 @@
"Debug", "Debug",
"Volume", "Volume",
"Engine Settings", "Engine Settings",
"Avatar Core" "Avatar Core",
"STT Settings",
"AI Settings",
"TTS Settings"
], ],
"Variables": [ "Variables": [
{ {
@ -262,7 +265,7 @@
"type": "string", "type": "string",
"default": "0Gc0wvOF2tTCr4APvZkDaieKCGeBR9c5EbC5utXgVWZUqu4IAEf6NQ721iHNu74SwfDoYSBGJHLmCbcXVDP+F4HKnwsfHr7WYi9Gv+CjJ7/UrOygkqlrP05hbHBrJiPLWDv4Gw==", "default": "0Gc0wvOF2tTCr4APvZkDaieKCGeBR9c5EbC5utXgVWZUqu4IAEf6NQ721iHNu74SwfDoYSBGJHLmCbcXVDP+F4HKnwsfHr7WYi9Gv+CjJ7/UrOygkqlrP05hbHBrJiPLWDv4Gw==",
"tooltip": "Encrypted Azure API Key", "tooltip": "Encrypted Azure API Key",
"category": "Avatar Core" "category": "STT Settings"
} }
}, },
{ {
@ -271,7 +274,7 @@
"type": "string", "type": "string",
"default": "germanywestcentral", "default": "germanywestcentral",
"tooltip": "Azure Region", "tooltip": "Azure Region",
"category": "Avatar Core" "category": "STT Settings"
} }
}, },
{ {
@ -320,7 +323,7 @@
}, },
"STTReplacements": [] "STTReplacements": []
}, },
"category": "Avatar Core", "category": "STT Settings",
"fields": "fields":
{ {
"bUsePTT": "bUsePTT":
@ -438,7 +441,7 @@
"type": "string", "type": "string",
"default": "UjzfgavJ45lCu+oB2vVAsKNbPT+k3XCv7t69Og6j0LmwxhD3OK5WDBxUvgKnuDrz3xuNHg==", "default": "UjzfgavJ45lCu+oB2vVAsKNbPT+k3XCv7t69Og6j0LmwxhD3OK5WDBxUvgKnuDrz3xuNHg==",
"tooltip": "Encrypted Azure OpenAI API Key", "tooltip": "Encrypted Azure OpenAI API Key",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -447,7 +450,7 @@
"type": "string", "type": "string",
"default": "gpt-realtime", "default": "gpt-realtime",
"tooltip": "Open AI Model", "tooltip": "Open AI Model",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -456,7 +459,7 @@
"type": "string", "type": "string",
"default": "aiwa-ai-new.openai.azure.com/openai", "default": "aiwa-ai-new.openai.azure.com/openai",
"tooltip": "URL to Azure OpenAI Resource", "tooltip": "URL to Azure OpenAI Resource",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -465,23 +468,25 @@
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"tooltip": "Direct audio generation by OpenAI", "tooltip": "Direct audio generation by OpenAI",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
"CustomOpenAIVoice": "CustomOpenAIVoice":
{ {
"type": "enum", "type": "enum",
"default": "UNDEFINED", "default": "coral",
"tooltip": "Only Set if you want to override the Avatars Voice", "tooltip": "Only Set if you want to override the Avatars Voice",
"category": "Avatar Core", "category": "AI Settings",
"enum": [ "enum": [
"UNDEFINED", "UNDEFINED",
"alloy", "alloy",
"ash", "ash",
"ballad", "ballad",
"cedar",
"coral", "coral",
"echo", "echo",
"marin",
"sage", "sage",
"shimmer", "shimmer",
"verse" "verse"
@ -494,7 +499,7 @@
"type": "integer", "type": "integer",
"default": 10, "default": 10,
"tooltip": "OpenAI Timeout in seconds", "tooltip": "OpenAI Timeout in seconds",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -503,7 +508,7 @@
"type": "float", "type": "float",
"default": 0.80000000000000004, "default": 0.80000000000000004,
"tooltip": "Temperature of the AI Model", "tooltip": "Temperature of the AI Model",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -512,7 +517,7 @@
"type": "integer", "type": "integer",
"default": 2000, "default": 2000,
"tooltip": "Max Token per Request of the AI Model", "tooltip": "Max Token per Request of the AI Model",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -521,7 +526,7 @@
"type": "string", "type": "string",
"default": "9ksww+/kHZPYMfUFTWSi1QgaDjXaB7vxdGKPgmfGhPEx321nfpdbkUnThXT4BWrkKMAR0MF2zJT17fJSday8yBiftv0=", "default": "9ksww+/kHZPYMfUFTWSi1QgaDjXaB7vxdGKPgmfGhPEx321nfpdbkUnThXT4BWrkKMAR0MF2zJT17fJSday8yBiftv0=",
"tooltip": "Azure AI Search API Key", "tooltip": "Azure AI Search API Key",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -530,7 +535,7 @@
"type": "string", "type": "string",
"default": "aiwa-ai-search.search.windows.net", "default": "aiwa-ai-search.search.windows.net",
"tooltip": "Azure AIWA URL", "tooltip": "Azure AIWA URL",
"category": "Avatar Core" "category": "AI Settings"
} }
}, },
{ {
@ -539,7 +544,15 @@
"type": "string", "type": "string",
"default": "aiwa-ai-search", "default": "aiwa-ai-search",
"tooltip": "Azure AI Search Indexname", "tooltip": "Azure AI Search Indexname",
"category": "Avatar Core" "category": "AI Settings"
}
},
{
"UseCachingSystem":
{
"type": "boolean",
"default": true,
"category": "TTS Settings"
} }
}, },
{ {
@ -547,7 +560,7 @@
{ {
"type": "float", "type": "float",
"default": 0.01, "default": 0.01,
"category": "Avatar Core" "category": "TTS Settings"
} }
}, },
{ {
@ -555,16 +568,7 @@
{ {
"type": "float", "type": "float",
"default": 0.25, "default": 0.25,
"category": "Avatar Core" "category": "TTS Settings"
}
},
{
"MaxConcurrentTTSGenerations":
{
"type": "integer",
"default": 2,
"tooltip": "Max concurrent Task for audio generation",
"category": "Avatar Core"
} }
} }
] ]

12
Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/AvatarCoreAIRealtime.h

@ -31,18 +31,6 @@ enum class EOpenAIRequestType : uint8 {
error UMETA(DisplayName = "Error") error UMETA(DisplayName = "Error")
}; };
UENUM(BlueprintType)
enum class EOpenAIRealtimeVoices : uint8 {
alloy UMETA(DisplayName = "alloy"),
ash UMETA(DisplayName = "ash"),
ballad UMETA(DisplayName = "ballad"),
coral UMETA(DisplayName = "coral"),
echo UMETA(DisplayName = "echo"),
sage UMETA(DisplayName = "sage"),
shimmer UMETA(DisplayName = "shimmer"),
verse UMETA(DisplayName = "verse")
};
UENUM(BlueprintType) UENUM(BlueprintType)
enum class EOpenAIRequestState : uint8 { enum class EOpenAIRequestState : uint8 {
undefined UMETA(DisplayName = "UNDEFINED"), undefined UMETA(DisplayName = "UNDEFINED"),

10
Unreal/Plugins/AvatarCore_AI/Source/AvatarCore_AI/Public/RealtimeAPI/RealtimeAPIConfig.h

@ -12,8 +12,10 @@ enum class EOpenAIRealtimeVoice : uint8 {
alloy UMETA(DisplayName = "alloy"), alloy UMETA(DisplayName = "alloy"),
ash UMETA(DisplayName = "ash"), ash UMETA(DisplayName = "ash"),
ballad UMETA(DisplayName = "ballad"), ballad UMETA(DisplayName = "ballad"),
cedar UMETA(DisplayName = "cedar"),
coral UMETA(DisplayName = "coral"), coral UMETA(DisplayName = "coral"),
echo UMETA(DisplayName = "echo"), echo UMETA(DisplayName = "echo"),
marin UMETA(DisplayName = "marin"),
sage UMETA(DisplayName = "sage"), sage UMETA(DisplayName = "sage"),
shimmer UMETA(DisplayName = "shimmer"), shimmer UMETA(DisplayName = "shimmer"),
verse UMETA(DisplayName = "verse") verse UMETA(DisplayName = "verse")
@ -31,27 +33,35 @@ public:
URealtimeAPIConfig(const FObjectInitializer& ObjectInitializer); URealtimeAPIConfig(const FObjectInitializer& ObjectInitializer);
//Base URL - Change this to the correct Azure API URL
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
FString BaseURL = "api.openai.com"; FString BaseURL = "api.openai.com";
//Do we use the Microsoft Azure OpenAI API
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
bool IsAzureOpenAI = false; bool IsAzureOpenAI = false;
//The OpenAI API Key
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
FString APIKey; FString APIKey;
//OpenAI Model
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
FString Model = "gpt-realtime"; FString Model = "gpt-realtime";
//OpenAI RealtimeAPI Voice
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
EOpenAIRealtimeVoice Voice = EOpenAIRealtimeVoice::alloy; EOpenAIRealtimeVoice Voice = EOpenAIRealtimeVoice::alloy;
//Max Token per Request
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
int MaxTokens = 1500; int MaxTokens = 1500;
//Temperature of the AI model
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
float Temperature = 0.8f; float Temperature = 0.8f;
//Shall we forward all audio chunks directly to OpenAI - Does not work well, if we do not forward silence as well
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true")) UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "AvatarCoreAI|Settings", meta = (ExposeOnSpawn = "true"))
bool InputAudioStreaming = false; bool InputAudioStreaming = false;
}; };

Loading…
Cancel
Save