Skip to content

Commit

Permalink
Remove encoding options to fix non-aws STT services
Browse files Browse the repository at this point in the history
  • Loading branch information
RobCharisma committed Oct 14, 2024
1 parent 15e331e commit cb87209
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Source/CharismaModule/Private/Playthrough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void UPlaythrough::Pause() const
}

void UPlaythrough::StartSpeechRecognition(bool& bWasSuccessful, const ECharismaSpeechRecognitionService service,
const FString languageCode, const FString encoding, const int32 sampleRate)
const FString languageCode, const int32 sampleRate)
{
if (!RoomInstance || ConnectionState != ECharismaPlaythroughConnectionState::Connected)
{
Expand All @@ -378,7 +378,6 @@ void UPlaythrough::StartSpeechRecognition(bool& bWasSuccessful, const ECharismaS
SpeechRecognitionStartPayload payload;
payload.service = FStringToStdString(GetSpeechRecognitionServiceString(service));
payload.languageCode = FStringToStdString(languageCode);
payload.encoding = FStringToStdString(encoding);
payload.sampleRate = sampleRate;

RoomInstance->Send("speech-recognition-start", payload);
Expand Down
4 changes: 2 additions & 2 deletions Source/CharismaModule/Public/CharismaEvents.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ struct SpeechRecognitionStartPayload
std::string service;
TOptional<int> sampleRate;
TOptional<std::string> languageCode;
TOptional<std::string> encoding;
//TOptional<std::string> encoding;

MSGPACK_DEFINE_MAP(service, sampleRate, languageCode, encoding);
MSGPACK_DEFINE_MAP(service, sampleRate, languageCode/*, encoding*/);
};
1 change: 0 additions & 1 deletion Source/CharismaModule/Public/Playthrough.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class CHARISMAMODULE_API UPlaythrough : public UObject
void StartSpeechRecognition(bool& bWasSuccessful,
const ECharismaSpeechRecognitionService service = ECharismaSpeechRecognitionService::AWS,
const FString languageCode = "en-US",
const FString encoding = "pcm",
const int32 sampleRate = 16000);

UFUNCTION(BlueprintCallable, Category = "Charisma|Playthrough Events")
Expand Down

0 comments on commit cb87209

Please sign in to comment.