|
|
|
@ -63,6 +63,7 @@ void USTTPreprocessorVAD::OnChunkReceived(TArray<int16> PCMData, FAudioInformati |
|
|
|
const float Dbfs = 20.0f * FMath::LogX(10.0f, Rms); |
|
|
|
//UE_LOG(LogTemp, Warning, TEXT("Dbfs %f"), Dbfs);
|
|
|
|
isLoadEnough = (Dbfs < static_cast<float>(STTBaseSettings.VADSettings.VAD_MinSpeechAmplitude)); |
|
|
|
isLoadEnough = (Dbfs > static_cast<float>(STTBaseSettings.VADSettings.VAD_MinSpeechAmplitude)); |
|
|
|
} |
|
|
|
|
|
|
|
if(currentVADState != lastVADState || !isLoadEnough) |
|
|
|
|