Phase 1B: Remove duplicate speech client, align freestyle port with existing config
- Delete HyperTwistIPC/HyperTwistHttpSpeechClient.h (duplicate of existing HyperTwistRecognition version) - Update freestyle_sidecar.bat to port 8766 matching UHyperTwistHttpSpeechClient ServiceBaseUrl
This commit is contained in:
parent
cc7a5a8bac
commit
f4246c5fcf
2 changed files with 1 additions and 52 deletions
|
|
@ -34,5 +34,5 @@ if errorlevel 1 (
|
|||
)
|
||||
|
||||
REM Start the server
|
||||
echo Starting freestyle server on port 8787...
|
||||
echo Starting freestyle server on port 8766...
|
||||
node dist\index.js
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "Http.h"
|
||||
#include "HyperTwistHttpSpeechClient.generated.h"
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FHyperTwistSpeechTranscriptResult
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "HyperTwist|Speech")
|
||||
bool bSuccess = false;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "HyperTwist|Speech")
|
||||
FString Transcript;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "HyperTwist|Speech")
|
||||
FString ErrorMessage;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly, Category = "HyperTwist|Speech")
|
||||
float Confidence = 0.0f;
|
||||
};
|
||||
|
||||
/**
|
||||
* HTTP client for freestyle-voice sidecar integration.
|
||||
* Communicates with the freestyle Node.js server running on localhost:8787.
|
||||
*/
|
||||
UCLASS()
|
||||
class UNREALHYPERTWIST_API UHyperTwistHttpSpeechClient : public UBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Speech", meta = (WorldContext = "WorldContextObject"))
|
||||
static void SendDictationAudio(UObject* WorldContextObject, const TArray<uint8>& PCM16Data,
|
||||
const FOnSpeechTranscriptReceived& OnComplete);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Speech")
|
||||
static bool IsFreestyleSidecarReachable();
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "HyperTwist|Speech")
|
||||
static FString GetFreestyleSidecarUrl();
|
||||
|
||||
/** Parse move notation from transcript. e.g. "R prime" -> R counter-clockwise */
|
||||
UFUNCTION(BlueprintCallable, Category = "HyperTwist|Speech")
|
||||
static TArray<FString> ParseMoveNotation(const FString& Transcript);
|
||||
};
|
||||
|
||||
DECLARE_DYNAMIC_DELEGATE_OneParam(FOnSpeechTranscriptReceived, const FHyperTwistSpeechTranscriptResult&, Result);
|
||||
Loading…
Add table
Reference in a new issue