numpy.log(somme1 + 1 / delta - 1) - somme1
return numpy.mean(Pxy)
+
+
+# Generate Grapher for IRITMonopoly analyzer
+from timeside.core.grapher import DisplayAnalyzer
+
+DisplayMonopoly = DisplayAnalyzer.create(
+ analyzer=IRITMonopoly,
+ result_id='irit_monopoly.segments',
+ grapher_id='grapher_monopoly_segments',
+ grapher_name='Mono/Poly segmentation',
+ background='waveform',
+ staging=True)
from timeside.plugins.analyzer.utils import MACHINE_EPSILON
from timeside.core.tools.buffering import BufferTable
+
import numpy
from scipy.signal import firwin, lfilter, lfiltic
from scipy.ndimage.morphology import binary_opening, binary_closing
silences = [1 if e < self.max_energy else 0 for e in self.energy]
step = float(self.input_stepsize) / float(self.samplerate())
- models_dir = os.path.join(timeside.__path__[0],
- 'analyzer', 'trained_models')
+ path = os.path.split(__file__)[0]
+ models_dir = os.path.join(path, 'trained_models')
+
prototype1_file = os.path.join(models_dir,
'irit_noise_startSilences_proto1.dat')
prototype2_file = os.path.join(models_dir,
return computeDist(v2, v1, min_overlap)
return d, v1_out, v2_out
+
+
+# Generate Grapher for IRITStartSeg analyzer
+from timeside.core.grapher import DisplayAnalyzer
+DisplayIRIT_Start = DisplayAnalyzer.create(
+ analyzer=IRITStartSeg,
+ result_id='irit_startseg.segments',
+ grapher_id='grapher_irit_startseg',
+ grapher_name='Analogous start point',
+ background='waveform',
+ staging=True)
return
+
+
+# Generate Grapher for IRITSpeech4Hz analyzer
+from timeside.core.grapher import DisplayAnalyzer
+
+Display4hzSpeechSegmentation = DisplayAnalyzer.create(
+ analyzer=IRITSpeech4Hz,
+ result_id='irit_speech_4hz.segments',
+ grapher_id='grapher_irit_speech_4hz_segments',
+ grapher_name='Speech segmentation',
+ background='waveform',
+ staging=True)
+
+# IRIT 4Hz with median filter
+Display4hzSpeechSegmentation = DisplayAnalyzer.create(
+ analyzer=IRITSpeech4Hz,
+ result_id='irit_speech_4hz.segments_median',
+ grapher_id='grapher_irit_speech_4hz_segments_median',
+ grapher_name='Speech segmentation (median)',
+ background='waveform',
+ staging=True)