688e56c09d028c0a956d1434ee16c60aea820de1,inaSpeechSegmenter/segmenter.py,Segmenter,__call__,#Segmenter#,157
Before Change
do segmentation on any kind on media file, including urls
slower than segmentwav method
base , _ = os.path.splitext(os.path.basename(medianame))
with tempfile.TemporaryDirectory(dir=tmpdir) as tmpdirname:
tmpwav = tmpdirname + "/" + base + ".wav"
After Change
do segmentation on any kind on media file, including urls
slower than segmentwav method
alles = [os.path.splitext(os.path.basename(e)) for e in medianame ]
base = [alles[i][0] for i in range(len(alles))]
// ext = [alles[i][1] for i in range(len(alles))]
with tempfile.TemporaryDirectory(dir=tmpdir) as tmpdirname:
tmpwav = ["%s/%s.wav" % (tmpdirname, elem) for elem in base]
list_of_data = list()
for media_name, tmp_wav in zip(medianame, tmpwav):
args = [ffmpeg, "-y", "-i", media_name, "-ar", "16000", "-ac", "1", tmp_wav]
p = Popen(args, stdout=PIPE, stderr=PIPE)
output, error = p.communicate()
assert p.returncode == 0, error
list_of_data.append(self.segmentwav(tmp_wav))
return list_of_data
def seg2csv(lseg, fout=None):
if fout is None:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: ina-foss/inaSpeechSegmenter
Commit Name: 688e56c09d028c0a956d1434ee16c60aea820de1
Time: 2018-04-19
Author: eliottlechapt@yahoo.fr
File Name: inaSpeechSegmenter/segmenter.py
Class Name: Segmenter
Method Name: __call__
Project Name: explosion/thinc
Commit Name: d6d7cb7db51776b026514a1a2caa4073b9e998ad
Time: 2020-01-19
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: pad
Project Name: astroML/astroML
Commit Name: 44ad29832a7c8adb134f53f1017dd7c0c7fc98ef
Time: 2012-10-28
Author: vanderplas@astro.washington.edu
File Name: astroML/plotting/tools.py
Class Name:
Method Name: devectorize_axes