- attempt to make MOSes better
This commit is contained in:
parent
4696b0e690
commit
e512f7a643
414
bin/pvqa.cfg
414
bin/pvqa.cfg
|
|
@ -1,226 +1,232 @@
|
||||||
BOF Common
|
Common:
|
||||||
IntervalLength = 0.68
|
IntervalLength: 0.68
|
||||||
IsUseUncertain = false
|
IsUseUncertain: no
|
||||||
IsUseMixMode = true
|
IsUseMixMode: yes
|
||||||
IsUseDistance = false
|
IsUseDistance: no
|
||||||
AllWeight = 1.0
|
AllWeight: 1.0
|
||||||
SilWeight = 1
|
SilWeight: 1.0
|
||||||
VoiWeight = 1
|
VoiWeight: 1.0
|
||||||
AllCoefficient = 1.0
|
AllCoefficient: 1.0
|
||||||
SilCoefficient = 1.0
|
SilCoefficient: 1.0
|
||||||
VoiCoefficient = 1.0
|
VoiCoefficient: 1.0
|
||||||
SilThreshold = -37.50
|
SilThreshold: -37.50
|
||||||
IsOnePointSil = false
|
IsOnePointSil: no
|
||||||
IsNormResult = true
|
IsNormResult: yes
|
||||||
IsMapScore = true
|
IsMapScore: yes
|
||||||
EOF Common
|
NormalizeByRms: yes
|
||||||
|
|
||||||
BOF Detector
|
SilenceEraser:
|
||||||
Name = SNR
|
Enabled: no
|
||||||
DetectorType = SNR
|
Options:
|
||||||
IntThresh = 0.10
|
|
||||||
FrameThresh = 14
|
|
||||||
DetThresh = 0.10
|
|
||||||
PVQA-Flag = true
|
|
||||||
PVQA-Weight = 1.0
|
|
||||||
DetMode = Both
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
Detector:
|
||||||
Name = DeadAir-00
|
- Name: SNR
|
||||||
DetectorType = DeadAir
|
DetectorType: SNR
|
||||||
IntThresh = 0.60
|
IntThresh: 0.10
|
||||||
DetThresh = 0.60
|
FrameThresh: 14
|
||||||
PVQA-Flag = true
|
DetThresh: 0.10
|
||||||
PVQA-Weight = 1.0
|
PVQA-Flag: yes
|
||||||
DetMode = Both
|
PVQA-Weight: 1.0
|
||||||
EOF Detector
|
DetMode: both
|
||||||
|
|
||||||
BOF Detector
|
- Name: Noise
|
||||||
Name = DeadAir-01
|
DetectorType: Noise
|
||||||
DetectorType = DeadAir
|
IntThresh: 0.99
|
||||||
IntThresh = 0.5
|
DetThresh: 0.99
|
||||||
DetThresh = 0.5
|
# This is still experimental detector so its values are not participating in MOS calculation
|
||||||
PVQA-Flag = true
|
PVQA-Flag: false
|
||||||
PVQA-Weight = 1.0
|
PVQA-Weight: 1.0
|
||||||
DetMode = Both
|
DetMode: both
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
- Name: DTMF
|
||||||
Name = Click
|
DetectorType: DTMF
|
||||||
DetectorType = Clicking
|
IntThresh: 0.99
|
||||||
IntThresh = 0.10
|
DetThresh: 0.99
|
||||||
DetThresh = 0.10
|
|
||||||
PVQA-Flag = true
|
|
||||||
PVQA-Weight = 1.0
|
|
||||||
DetMode = Both
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
# There is no sense to use detected DTMF signal in MOS calculation in the current config
|
||||||
Name = VAD-Clipping
|
PVQA-Flag: no
|
||||||
DetectorType = VADClipping
|
PVQA-Weight: 0.0
|
||||||
IntThresh = 0.0
|
DetMode: both
|
||||||
FrameThresh = 0.0
|
|
||||||
DetThresh = 0.0
|
|
||||||
PVQA-Flag = true
|
|
||||||
PVQA-Weight = 1.0
|
|
||||||
DetMode = Both
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
- Name: DeadAir-00
|
||||||
Name = Amplitude-Clipping
|
DetectorType: DeadAir
|
||||||
DetectorType = AmpClipping
|
IntThresh: 0.60
|
||||||
IntThresh = 0.00
|
DetThresh: 0.60
|
||||||
FrameThresh = 1.00
|
PVQA-Flag: true
|
||||||
DetThresh = 0.00
|
PVQA-Weight: 1.0
|
||||||
PVQA-Flag = true
|
DetMode: both
|
||||||
PVQA-Weight = 1.00
|
|
||||||
DetMode = Both
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
- Name: DeadAir-01
|
||||||
Name = Dynamic-Clipping
|
DetectorType: DeadAir
|
||||||
DetectorType = AmpClipping
|
IntThresh: 0.5
|
||||||
IntThresh = 0.05
|
DetThresh: 0.5
|
||||||
FrameThresh = 1.50
|
PVQA-Flag: yes
|
||||||
DetThresh = 0
|
PVQA-Weight: 1.0
|
||||||
PVQA-Flag = true
|
DetMode: both
|
||||||
PVQA-Weight = 0.0
|
Override:
|
||||||
DetMode = Voice
|
MinLevelThreshold: 0
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Base EchoMono
|
|
||||||
SamplesType = UnKnownCodec
|
|
||||||
StepLengthSec = 0.5
|
|
||||||
MinDelayMs = 50
|
|
||||||
MaxLengthMs = 2800
|
|
||||||
WindowFunckID = 0
|
|
||||||
SpanLengthMs = 50
|
|
||||||
EOF Base EchoMono
|
|
||||||
|
|
||||||
BOF Detector
|
|
||||||
Name = ECHO
|
|
||||||
DetectorType = EchoMono
|
|
||||||
IntThresh = 0.00
|
|
||||||
FrameThresh = -40.0
|
|
||||||
DetThresh = 0.00
|
|
||||||
PVQA-Flag = true
|
|
||||||
PVQA-Weight = 1.0
|
|
||||||
DetMode = Voice
|
|
||||||
STAT-Flag = true
|
|
||||||
SpanLengthMs = 50
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Detector
|
|
||||||
Name = Silent-Call-Detection
|
|
||||||
DetectorType = DeadAir
|
|
||||||
IntThresh = 0.99
|
|
||||||
DetThresh = 0.99
|
|
||||||
PVQA-Flag = false
|
|
||||||
PVQA-Weight = 1.0
|
|
||||||
EOF Detector
|
|
||||||
|
|
||||||
BOF Base SNR
|
|
||||||
MinPowerThresh = 1.0000
|
|
||||||
LogEnergyCoefficient = 10.0000
|
|
||||||
MinSignalLevel = 40.0000
|
|
||||||
MinSNRDelta = 0.0001
|
|
||||||
MinEnergyDisp = 3.0000
|
|
||||||
MinEnergyDelta = 1.0000
|
|
||||||
SamplesType = UnKnownCodec
|
|
||||||
EOF Base SNR
|
|
||||||
|
|
||||||
BOF Base AmpClipping
|
|
||||||
FlyAddingCoefficient = 0.1000
|
|
||||||
IsUseDynamicClipping = false
|
|
||||||
SamplesType = UnKnownCodec
|
|
||||||
EOF Base AmpClipping
|
|
||||||
|
|
||||||
BOF Base Clicking
|
|
||||||
SamplesType = UnKnownCodec
|
|
||||||
EOF Base Clicking
|
|
||||||
|
|
||||||
BOF Base DeadAir
|
|
||||||
StuckDeltaThreshold = 6
|
|
||||||
MinNonStuckTime = 80
|
|
||||||
MinStuckTime = 80
|
|
||||||
MinStartNonStuckTime = 1920
|
|
||||||
MinLevelThreshold = 256
|
|
||||||
SamplesType = UnKnownCodec
|
|
||||||
EOF Base DeadAir
|
|
||||||
|
|
||||||
BOF Base VADClipping
|
- Name: Click
|
||||||
SamplesType = UnKnownCodec
|
DetectorType: Clicking
|
||||||
EOF Base VADClipping
|
IntThresh: 0.10
|
||||||
|
DetThresh: 0.10
|
||||||
|
PVQA-Flag: true
|
||||||
|
PVQA-Weight: 1.0
|
||||||
|
DetMode: both
|
||||||
|
|
||||||
BOF DeadAir-01
|
- Name: VAD-Clipping
|
||||||
MinLevelThreshold = 0
|
DetectorType: VADClipping
|
||||||
EOF DeadAir-01
|
IntThresh: 0.0
|
||||||
|
FrameThresh: 0.0
|
||||||
|
DetThresh: 0.0
|
||||||
|
PVQA-Flag: true
|
||||||
|
PVQA-Weight: 1.0
|
||||||
|
DetMode: both
|
||||||
|
|
||||||
BOF Silent-Call-Detection
|
- Name: AmpClipping
|
||||||
MinLevelThreshold = 0
|
DetectorType: AmpClipping
|
||||||
IsUseRMSPower = true
|
IntThresh: 0.00
|
||||||
MinRMSThreshold = -70
|
FrameThresh: 1.00
|
||||||
EOF Silent-Call-Detection
|
DetThresh: 0.00
|
||||||
|
PVQA-Flag: true
|
||||||
|
PVQA-Weight: 1.00
|
||||||
|
DetMode: both
|
||||||
|
|
||||||
BOF Dynamic-Clipping
|
- Name: DynClipping
|
||||||
FlyAddingCoefficient = 0.1000
|
DetectorType: AmpClipping
|
||||||
SamplesType = UnKnownCodec
|
IntThresh: 0.05
|
||||||
IsUseDynamicClipping = true
|
FrameThresh: 1.50
|
||||||
EOF Dynamic-Clipping
|
DetThresh: 0
|
||||||
|
PVQA-Flag: true
|
||||||
|
PVQA-Weight: 0.0
|
||||||
|
DetMode: voice
|
||||||
|
Override:
|
||||||
|
FlyAddingCoefficient: 0.1000
|
||||||
|
SamplesType: UnKnownCodec
|
||||||
|
IsUseDynamicClipping: yes
|
||||||
|
|
||||||
BOF Correction
|
- Name: Echo
|
||||||
IntStart = 5.0
|
DetectorType: EchoMono
|
||||||
IntEnd = 4.2
|
IntThresh: 0.00
|
||||||
Mult = 1.0
|
FrameThresh: -40.0
|
||||||
#Shift = -1.7
|
DetThresh: 0.00
|
||||||
Shift = 0
|
PVQA-Flag: true
|
||||||
EOF Correction
|
PVQA-Weight: 1.0
|
||||||
|
DetMode: voice
|
||||||
|
STAT-Flag: true
|
||||||
|
SpanLengthMs: 50
|
||||||
|
|
||||||
BOF Correction
|
- Name: SilentCall
|
||||||
IntStart = 4.2
|
DetectorType: DeadAir
|
||||||
IntEnd = 3.5
|
IntThresh: 0.99
|
||||||
Mult = 1.0
|
DetThresh: 0.99
|
||||||
#Shift = -0.85
|
PVQA-Flag: false
|
||||||
Shift = 0
|
PVQA-Weight: 1.0
|
||||||
EOF Correction
|
Override:
|
||||||
|
MinLevelThreshold: 0
|
||||||
|
IsUseRMSPower: yes
|
||||||
|
MinRMSThreshold: -70
|
||||||
|
|
||||||
BOF SR Correction
|
|
||||||
SampleRate = 11000.0
|
|
||||||
Shift = 0.05
|
|
||||||
EOF SR Correction
|
|
||||||
|
|
||||||
BOF SR Correction
|
|
||||||
SampleRate = 16000.0
|
|
||||||
Shift = 0.1
|
|
||||||
EOF SR Correction
|
|
||||||
|
|
||||||
BOF SR Correction
|
Base EchoMono:
|
||||||
SampleRate = 22000.0
|
SamplesType: UnKnownCodec
|
||||||
Shift = 0.2
|
StepLengthSec: 0.5
|
||||||
EOF SR Correction
|
MinDelayMs: 50
|
||||||
|
MaxLengthMs: 2800
|
||||||
|
WindowFunckID: 0
|
||||||
|
SpanLengthMs: 50
|
||||||
|
|
||||||
BOF SR Correction
|
Base SNR:
|
||||||
SampleRate = 32000.0
|
MinPowerThresh: 1.0000
|
||||||
Shift = 0.3
|
LogEnergyCoefficient: 10.0000
|
||||||
EOF SR Correction
|
MinSignalLevel: 40.0000
|
||||||
|
MinSNRDelta: 0.0001
|
||||||
|
MinEnergyDisp: 3.0000
|
||||||
|
MinEnergyDelta: 1.0000
|
||||||
|
SamplesType: UnKnownCodec
|
||||||
|
|
||||||
BOF SR Correction
|
Base DTMF:
|
||||||
SampleRate = 48000.0
|
SamplesType: UnKnownCodec
|
||||||
Shift = 0.45
|
|
||||||
EOF SR Correction
|
|
||||||
|
|
||||||
BOF SR Correction
|
Base AmpClipping:
|
||||||
SampleRate = 96000.0
|
FlyAddingCoefficient: 0.1000
|
||||||
Shift = 0.5
|
IsUseDynamicClipping: no
|
||||||
EOF SR Correction
|
SamplesType: UnKnownCodec
|
||||||
|
|
||||||
BOF SR Correction
|
Base Clicking:
|
||||||
SampleRate = 192000.0
|
SamplesType: UnKnownCodec
|
||||||
Shift = 0.6
|
|
||||||
EOF SR Correction
|
|
||||||
|
|
||||||
BOF Scores Map
|
Base DeadAir:
|
||||||
ScoresLine = 4;3.027000;2.935000;2.905000;2.818000;2.590000;2.432000;2.310000;1.665000;1.000000;
|
StuckDeltaThreshold: 6
|
||||||
EOF Scores Map
|
MinNonStuckTime: 80
|
||||||
|
MinStuckTime: 80
|
||||||
|
MinStartNonStuckTime: 1920
|
||||||
|
MinLevelThreshold: 256
|
||||||
|
SamplesType: UnKnownCodec
|
||||||
|
|
||||||
|
Base VADClipping:
|
||||||
|
SamplesType: UnKnownCodec
|
||||||
|
|
||||||
|
Base Noise:
|
||||||
|
Interval: 0.1 # Seconds
|
||||||
|
DetectorType: RMS # This can be FFT as well
|
||||||
|
NoiseThreshold: 20
|
||||||
|
SignalThreshold: 80
|
||||||
|
Normalize: no
|
||||||
|
RemoveBias: no
|
||||||
|
ResultDb: yes
|
||||||
|
WindowType: Hann
|
||||||
|
WindowWidth: 3
|
||||||
|
|
||||||
|
# Moved to Override: sections
|
||||||
|
# DeadAir-01:
|
||||||
|
# MinLevelThreshold: 0
|
||||||
|
|
||||||
|
# SilentCall:
|
||||||
|
# MinLevelThreshold: 0
|
||||||
|
# IsUseRMSPower: yes
|
||||||
|
# MinRMSThreshold: -70
|
||||||
|
|
||||||
|
# Dynamic-Clipping:
|
||||||
|
# FlyAddingCoefficient: 0.1000
|
||||||
|
# SamplesType: UnKnownCodec
|
||||||
|
# IsUseDynamicClipping: yes
|
||||||
|
|
||||||
|
Correction:
|
||||||
|
- IntStart: 5.0
|
||||||
|
IntEnd: 4.2
|
||||||
|
Mult: 1.0
|
||||||
|
Shift: 0
|
||||||
|
|
||||||
|
- IntStart: 4.2
|
||||||
|
IntEnd: 3.5
|
||||||
|
Mult: 1.0
|
||||||
|
Shift: 0
|
||||||
|
|
||||||
|
|
||||||
|
SR Correction:
|
||||||
|
- SampleRate: 11000.0
|
||||||
|
Shift: 0.05
|
||||||
|
|
||||||
|
- SampleRate: 16000.0
|
||||||
|
Shift: 0.1
|
||||||
|
|
||||||
|
- SampleRate: 22000.0
|
||||||
|
Shift: 0.2
|
||||||
|
|
||||||
|
- SampleRate: 32000.0
|
||||||
|
Shift: 0.3
|
||||||
|
|
||||||
|
- SampleRate: 48000.0
|
||||||
|
Shift: 0.45
|
||||||
|
|
||||||
|
- SampleRate: 96000.0
|
||||||
|
Shift: 0.5
|
||||||
|
|
||||||
|
- SampleRate: 192000.0
|
||||||
|
Shift: 0.6
|
||||||
|
|
||||||
|
Scores Map:
|
||||||
|
ScoresLine: 4;3.027000;2.935000;2.905000;2.818000;2.590000;2.432000;2.310000;1.665000;1.000000;
|
||||||
|
|
||||||
|
|
|
||||||
BIN
bin/rpi/aqua-wb
BIN
bin/rpi/aqua-wb
Binary file not shown.
BIN
bin/rpi/pvqa
BIN
bin/rpi/pvqa
Binary file not shown.
|
|
@ -152,17 +152,20 @@ def run_analyze(file_test: str, file_reference: str, number: str) -> bool:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bounds_signal : SignalBoundaries = detect_degraded_signal(Path(file_test), Path(file_reference))
|
bounds_signal : SignalBoundaries = None
|
||||||
# bounds_signal.offset_start = 0
|
if is_caller:
|
||||||
# bounds_signal.offset_finish = 0
|
bounds_signal.offset_start = 10.0 # Skip ringtones
|
||||||
print(f'Found signal bounds: {bounds_signal}')
|
bounds_signal.offset_finish = 1.0 # Eat possible end tone
|
||||||
|
elif is_answerer:
|
||||||
|
bounds_signal.offset_start = 0.0
|
||||||
|
bounds_signal.offset_finish = 1.0 # Eat possible end tone
|
||||||
|
|
||||||
# PVQA report
|
# PVQA report
|
||||||
pvqa_mos, pvqa_report, pvqa_rfactor = utils_sevana.find_pvqa_mos(file_test, bounds_signal.offset_start, bounds_signal.offset_finish)
|
pvqa_mos, pvqa_report, pvqa_rfactor = utils_sevana.find_pvqa_mos(file_test, bounds_signal.offset_start, bounds_signal.offset_finish)
|
||||||
utils.log(f'PVQA MOS: {pvqa_mos}, PVQA R-factor: {pvqa_rfactor}')
|
utils.log(f'PVQA MOS: {pvqa_mos}, PVQA R-factor: {pvqa_rfactor}')
|
||||||
|
|
||||||
# AQuA report
|
# AQuA report
|
||||||
bounds_reference : SignalBoundaries = detect_reference_signal(Path(file_reference))
|
bounds_reference : SignalBoundaries = SignalBoundaries()
|
||||||
bounds_reference.offset_start = 0
|
bounds_reference.offset_start = 0
|
||||||
bounds_reference.offset_finish = 0
|
bounds_reference.offset_finish = 0
|
||||||
|
|
||||||
|
|
@ -258,7 +261,7 @@ def make_call(target: str):
|
||||||
timelimit_seconds=ref_time_length,
|
timelimit_seconds=ref_time_length,
|
||||||
target=target)
|
target=target)
|
||||||
|
|
||||||
run_analyze(CONFIG.RecordFile, CONFIG.ReferenceAudio, target)
|
run_analyze(CONFIG.RecordFile, CONFIG.PreparedReferenceAudio, target)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
utils.log_error(f'BT I/O failed finally. Error: {str(e)}')
|
utils.log_error(f'BT I/O failed finally. Error: {str(e)}')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,6 @@ import time
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from colorama import Fore, Style
|
|
||||||
from utils_cache import InfoCache
|
|
||||||
|
|
||||||
PVQA_CMD = "{pvqa} --license {pvqa_lic} --config {pvqa_cfg} --mode analysis --channel 0 " \
|
PVQA_CMD = "{pvqa} --license {pvqa_lic} --config {pvqa_cfg} --mode analysis --channel 0 " \
|
||||||
"--report {output} --input {input} --cut-begin {cut_begin} --cut-end {cut_end}"
|
"--report {output} --input {input} --cut-begin {cut_begin} --cut-end {cut_end}"
|
||||||
|
|
@ -21,10 +19,8 @@ PVQA_CMD = "{pvqa} --license {pvqa_lic} --config {pvqa_cfg} --mode analysis --ch
|
||||||
PVQA_CMD_LIC_SERVER = "{pvqa} --license-server {pvqa_lic} --config {pvqa_cfg} --mode analysis --channel 0 " \
|
PVQA_CMD_LIC_SERVER = "{pvqa} --license-server {pvqa_lic} --config {pvqa_cfg} --mode analysis --channel 0 " \
|
||||||
"--report {output} --input {input}"
|
"--report {output} --input {input}"
|
||||||
|
|
||||||
AQUA_CMD = ("{aqua} {aqua_lic} -mode files -src file \"{reference}\" -tstf \"{input}\" -avlp off -smtnrm on "
|
AQUA_CMD = ("{aqua} {aqua_lic} -mode files -src file \"{reference}\" -tstf \"{input}\" -config {aqua_config} "
|
||||||
"-decor off -mprio off -acr auto -npnt auto -voip on -enorm rms -g711 off "
|
"-specp 32 {spectrum} -fau {faults} -cut-tst {cut_begin} {cut_end} -cut-src {cut_begin_src} {cut_end_src}")
|
||||||
"-spfrcor on -grad off -tmc on -hist-pitch on on -hist-levels on on on -miter 1 -specp 32 {spectrum} "
|
|
||||||
"-ratem %%m -fau {faults} -output json -trim r 15 -cut-tst {cut_begin} {cut_end} -cut-src {cut_begin_src} {cut_end_src}")
|
|
||||||
|
|
||||||
PVQA_PATH = ""
|
PVQA_PATH = ""
|
||||||
PVQA_LIC_PATH = "pvqa.lic"
|
PVQA_LIC_PATH = "pvqa.lic"
|
||||||
|
|
@ -32,6 +28,7 @@ PVQA_CFG_PATH = "pvqa.cfg"
|
||||||
|
|
||||||
AQUA_PATH = ""
|
AQUA_PATH = ""
|
||||||
AQUA_LIC_PATH = "aqua-wb.lic"
|
AQUA_LIC_PATH = "aqua-wb.lic"
|
||||||
|
AQUA_CFG_PATH = "aqua.cfg"
|
||||||
|
|
||||||
SILER_PATH = ""
|
SILER_PATH = ""
|
||||||
|
|
||||||
|
|
@ -78,9 +75,11 @@ def load_config_and_licenses(server: str):
|
||||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.cfg'), PVQA_CFG_PATH)
|
load_file(utils.join_host_and_path(server, '/deploy/pvqa.cfg'), PVQA_CFG_PATH)
|
||||||
load_file(utils.join_host_and_path(server, '/deploy/pvqa.lic'), PVQA_LIC_PATH)
|
load_file(utils.join_host_and_path(server, '/deploy/pvqa.lic'), PVQA_LIC_PATH)
|
||||||
load_file(utils.join_host_and_path(server, '/deploy/aqua-wb.lic'), AQUA_LIC_PATH)
|
load_file(utils.join_host_and_path(server, '/deploy/aqua-wb.lic'), AQUA_LIC_PATH)
|
||||||
|
load_file(utils.join_host_and_path(server, '/deploy/aqua.cfg'), AQUA_CFG_PATH)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
utils.log_error(f'Failed to fetch new licenses and config. Skipping it.')
|
utils.log_error(f'Failed to fetch new licenses and config. Skipping it.')
|
||||||
|
|
||||||
|
|
||||||
def find_binaries(bin_directory: Path, license_server: str = None) -> bool:
|
def find_binaries(bin_directory: Path, license_server: str = None) -> bool:
|
||||||
# Update path to pvqa/aqua-wb
|
# Update path to pvqa/aqua-wb
|
||||||
global PVQA_CFG_PATH, PVQA_LIC_PATH, AQUA_LIC_PATH, PVQA_PATH, AQUA_PATH, PVQA_CMD, AQUA_CMD, SILER_PATH, SPEECH_DETECTOR_PATH
|
global PVQA_CFG_PATH, PVQA_LIC_PATH, AQUA_LIC_PATH, PVQA_PATH, AQUA_PATH, PVQA_CMD, AQUA_CMD, SILER_PATH, SPEECH_DETECTOR_PATH
|
||||||
|
|
@ -94,6 +93,7 @@ def find_binaries(bin_directory: Path, license_server: str = None) -> bool:
|
||||||
PVQA_LIC_PATH = bin_directory / PVQA_LIC_PATH
|
PVQA_LIC_PATH = bin_directory / PVQA_LIC_PATH
|
||||||
PVQA_CFG_PATH = bin_directory / PVQA_CFG_PATH
|
PVQA_CFG_PATH = bin_directory / PVQA_CFG_PATH
|
||||||
AQUA_PATH = bin_directory / platform_prefix / AQUA_PATH
|
AQUA_PATH = bin_directory / platform_prefix / AQUA_PATH
|
||||||
|
AQUA_CFG_PATH = bin_directory / AQUA_CFG_PATH
|
||||||
AQUA_LIC_PATH = bin_directory / AQUA_LIC_PATH
|
AQUA_LIC_PATH = bin_directory / AQUA_LIC_PATH
|
||||||
SILER_PATH = bin_directory / platform_prefix / SILER_PATH
|
SILER_PATH = bin_directory / platform_prefix / SILER_PATH
|
||||||
SPEECH_DETECTOR_PATH = bin_directory / platform_prefix / SPEECH_DETECTOR_PATH
|
SPEECH_DETECTOR_PATH = bin_directory / platform_prefix / SPEECH_DETECTOR_PATH
|
||||||
|
|
@ -109,9 +109,16 @@ def find_binaries(bin_directory: Path, license_server: str = None) -> bool:
|
||||||
PVQA_CFG_PATH = Path(utils.get_script_path()) / 'pvqa.cfg'
|
PVQA_CFG_PATH = Path(utils.get_script_path()) / 'pvqa.cfg'
|
||||||
|
|
||||||
if not PVQA_CFG_PATH.exists():
|
if not PVQA_CFG_PATH.exists():
|
||||||
utils.log_error(f'Failed to find pvqa config.')
|
utils.log_error(f'Failed to find PVQA config file.')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if not AQUA_CFG_PATH.exists():
|
||||||
|
AQUA_CFG_PATH = Path(utils.get_script_path()) / 'aqua.cfg'
|
||||||
|
|
||||||
|
if not AQUA_CFG_PATH.exists():
|
||||||
|
utils.log_error(f'Failed to find AQuA config file.')
|
||||||
|
return False
|
||||||
|
|
||||||
if not AQUA_PATH.exists():
|
if not AQUA_PATH.exists():
|
||||||
utils.log_error(f'Failed to find aqua-wb binary.')
|
utils.log_error(f'Failed to find aqua-wb binary.')
|
||||||
return False
|
return False
|
||||||
|
|
@ -238,7 +245,7 @@ def find_aqua_mos(good_path, test_path, test_file_offset_begin: float = 0.0, tes
|
||||||
good_file_offset_begin: float = 0.0, good_file_offset_end: float = 0.0):
|
good_file_offset_begin: float = 0.0, good_file_offset_end: float = 0.0):
|
||||||
try:
|
try:
|
||||||
out_data = ""
|
out_data = ""
|
||||||
cmd = AQUA_CMD.format(aqua=AQUA_PATH, aqua_lic=AQUA_LIC_PATH,
|
cmd = AQUA_CMD.format(aqua=AQUA_PATH, aqua_lic=AQUA_LIC_PATH, aqua_config = AQUA_CFG_PATH,
|
||||||
reference=good_path, input=test_path, spectrum=AQUA_SPECTRUM,
|
reference=good_path, input=test_path, spectrum=AQUA_SPECTRUM,
|
||||||
faults=AQUA_FAULTS,
|
faults=AQUA_FAULTS,
|
||||||
cut_begin=int(test_file_offset_begin * 1000), cut_end=int(test_file_offset_end * 1000),
|
cut_begin=int(test_file_offset_begin * 1000), cut_end=int(test_file_offset_end * 1000),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue