This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from lucoiso/development
AzSpeech v1.6.11
- Loading branch information
Showing
12 changed files
with
414 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Source/AzSpeechEditor/Private/Generator/AzSpeechPropertiesGetter.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Author: Lucas Vilas-Boas | ||
// Year: 2023 | ||
// Repo: https://github.com/lucoiso/UEAzSpeech | ||
|
||
#include "AzSpeechPropertiesGetter.h" | ||
|
||
#ifdef UE_INLINE_GENERATED_CPP_BY_NAME | ||
#include UE_INLINE_GENERATED_CPP_BY_NAME(AzSpeechPropertiesGetter) | ||
#endif | ||
|
||
UAzSpeechPropertiesGetter::UAzSpeechPropertiesGetter(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) | ||
{ | ||
} | ||
|
||
void UAzSpeechPropertiesGetter::OnAvailableVoicesChanged(const TArray<FString>& Voices) | ||
{ | ||
OnAvailableVoicesUpdated.ExecuteIfBound(Voices); | ||
Destroy(); | ||
} | ||
|
||
void UAzSpeechPropertiesGetter::SynthesisCompleted(const TArray<uint8>& AudioData) | ||
{ | ||
OnAudioDataGenerated.ExecuteIfBound(AudioData); | ||
Destroy(); | ||
} | ||
|
||
void UAzSpeechPropertiesGetter::TaskFail() | ||
{ | ||
Destroy(); | ||
} | ||
|
||
void UAzSpeechPropertiesGetter::Destroy() | ||
{ | ||
ClearFlags(RF_Standalone); | ||
|
||
#if ENGINE_MAJOR_VERSION >= 5 | ||
MarkAsGarbage(); | ||
#else | ||
MarkPendingKill(); | ||
#endif | ||
} |
35 changes: 35 additions & 0 deletions
35
Source/AzSpeechEditor/Private/Generator/AzSpeechPropertiesGetter.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Author: Lucas Vilas-Boas | ||
// Year: 2023 | ||
// Repo: https://github.com/lucoiso/UEAzSpeech | ||
|
||
#pragma once | ||
|
||
#include <CoreMinimal.h> | ||
#include <UObject/Object.h> | ||
#include "AzSpeechPropertiesGetter.generated.h" | ||
|
||
DECLARE_DELEGATE_OneParam(FAvailableVoicesUpdated, TArray<FString>); | ||
DECLARE_DELEGATE_OneParam(FAudioDataGenerated, TArray<uint8>); | ||
|
||
UCLASS(MinimalAPI, NotBlueprintable, NotPlaceable, Category = "Implementation") | ||
class UAzSpeechPropertiesGetter : public UObject | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
explicit UAzSpeechPropertiesGetter(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get()); | ||
|
||
FAvailableVoicesUpdated OnAvailableVoicesUpdated; | ||
FAudioDataGenerated OnAudioDataGenerated; | ||
|
||
UFUNCTION() | ||
void OnAvailableVoicesChanged(const TArray<FString>& Voices); | ||
|
||
UFUNCTION() | ||
void SynthesisCompleted(const TArray<uint8>& AudioData); | ||
|
||
UFUNCTION() | ||
void TaskFail(); | ||
|
||
void Destroy(); | ||
}; |
Oops, something went wrong.