]> git.parisson.com Git - timeside-diadems.git/commitdiff
Put back grapher renderer for Irit analyzer
authorThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 12:23:17 +0000 (13:23 +0100)
committerThomas Fillon <thomas@parisson.com>
Tue, 20 Jan 2015 12:23:17 +0000 (13:23 +0100)
timeside/plugins/diadems/irit_monopoly.py
timeside/plugins/diadems/irit_noise_startSilences.py
timeside/plugins/diadems/irit_speech_4hz.py

index cbc48adfcd184c0a688b6ddd33364ffcd8f07cb5..fb848762848529fd9a5a1a0e048abf501cfd61f9 100644 (file)
@@ -167,3 +167,15 @@ class IRITMonopoly(Analyzer):
             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)
index 420604042bd3a521dcb68ff28af5293accb1b9c4..0ac49872a3e5767722ec72de759aad04c3828325 100644 (file)
@@ -27,6 +27,7 @@ from timeside.core.preprocessors import frames_adapter
 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
@@ -122,8 +123,9 @@ class IRITStartSeg(Analyzer):
         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,
@@ -215,3 +217,14 @@ def computeDist(v1, v2, min_overlap):
         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)
index c51721ab7eb00a408108b00b1f6a71150070ce47..00c25c951007a0758fb6dc61146aca03d1df1b0c 100644 (file)
@@ -209,3 +209,24 @@ class IRITSpeech4Hz(Analyzer):
 
 
         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)