Commit 554568fc authored by Sulfyderz's avatar Sulfyderz
Browse files

Test: ON

parent cb4b6ad0
......@@ -3484,6 +3484,11 @@ class Show(object):
# ATTENTION: Chaque condition considere que la frontiere "start" est validé/correcte (a été modifié à l'itération précédente si besoin il y a eu), quel ne dépasse pas le segment de ref
# VITERBI
print("SAME #VIN:",DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)))
if not DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)):
print(valueTmp)
print(DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp))
sys.exit()
if viterbi and ((alarmViterbi==True and alarmViterbiValue is None) or (alarmViterbi==True and alarmViterbiValue is not None and alarmViterbiValue<=diarRef[i-1]['start']+tolerance)):
alarmViterbi=False
alarmViterbiValue=None
......@@ -3542,7 +3547,7 @@ class Show(object):
if len(diarCheckedTmpBis)!=0 and ((viterbi__jumpOverSegmentsWithDuration is not None and valueRef.duration()>viterbi__jumpOverSegmentsWithDuration) or viterbi__jumpOverSegmentsWithDuration is None):
valueToLearn=DiarTools.mergeDiar(diar1=diarCheckedTmpBis,diar2=diarUncheckedTmp,sort=True)
print("UHUHU")
hmm=HumanAssistedViterbi(self.cepstrum, valueToLearn, exit_penalties=viterbi__exit_penalties, loop_penalties=viterbi__loop_penalties, adjustBoundaries=viterbi__adjustBoundaries,adjustBoundaries__pack=viterbi__adjustBoundaries__pack)
if actionsTime or viterbi__giveBackControlToUser:
......@@ -3662,7 +3667,13 @@ class Show(object):
# Stocke chaque diar apres chaque interaction humaine
if diarIncrementalActionsHumanAssistedCorrection and i!=0:
diarIncrementalThr.append(copy.deepcopy(value))
diarIncrementalThr.append(copy.deepcopy(value))
print("SAME #VOUT:",DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)))
if not DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)):
print(valueTmp)
print(DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp))
sys.exit()
# SELECTIONNE TOUS LES SEGMENTS HYPOTHESES AVANT LE PREMIER SEGMENT DE REFERENCE (signifie mal classé car silence coté ref)
if i==0:
......@@ -3812,11 +3823,6 @@ class Show(object):
# si 0 creer
if len(listHypRefSegment)==0 or (len(listHypRefSegment)==len(listHypRefSegmentWithinTolerance)):
print("SAME #A:",DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)))
if not DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)):
print(valueTmp)
print(DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp))
sys.exit()
# checking transcriber mode
if modeTranscriber == True:
if DiarTools.segmentExistsAccordingToTolerance(valueRef,tolerance):
......@@ -3862,11 +3868,7 @@ class Show(object):
# Application d'un viterbi à la prochaine iteration
alarmViterbi=True
print("SAME #B:",DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)))
if not DiarTools.sameDiar(valueTmp,DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp)):
print(valueTmp)
print(DiarTools.releaseFramesAccordingToDiar(diarRef,valueTmp))
sys.exit()
# si 1 alors affectation + move bound si besoin/et ou create bound sur stop
# si > 1 alors affectation + move bound si besoin/et ou create bound sur stop + merge
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment