wav2letter icon indicating copy to clipboard operation
wav2letter copied to clipboard

Is python binding impossible?

Open yuseungwoo opened this issue 4 years ago • 1 comments

Question

As your Important disclaimer, I accessed at flashlight (https://github.com/facebookresearch/flashlight) and build completely. At the stage of python bindings, I built flashlight and wanted to use it but i didn't

the example is https://github.com/facebookresearch/wav2letter/wiki/Python-bindings

  • imports from wav2letter.feature import FeatureParams, Mfcc import itertools as it

  • read the wave with open("path/to/file.wav") as f: wavinput = [float(x) for x in it.chain.from_iterable(line.split() for line in f)]

  • create params struct params = FeatureParams() params.sampling_freq = 16000 params.low_freq_filterbank = 0 params.high_freq_filterbank = 8000 params.num_filterbank_chans = 20 params.num_cepstral_coeffs = 13 params.use_energy = False params.zero_mean_frame = False params.use_power = False

  • define transformation and apply to the wave mfcc = Mfcc(params) features = mfcc.apply(wavinput)

Can you guide how to use python binding API in flashlight environment ?

==> https://github.com/facebookresearch/flashlight/tree/master/docs/source is the same?

Best Regards

yuseungwoo avatar Oct 14 '20 01:10 yuseungwoo

I guess you installed latest master of flashlight where python bindings now live. Then yes, this is https://github.com/facebookresearch/flashlight/blob/master/docs/source/bindings/python.rst the updated doc how to use them now in flashlight. Mostly the api is the same, only the place and naming of libs is restructured a bit. Also here are examples of code how to use https://github.com/facebookresearch/flashlight/tree/master/bindings/python/example.

tlikhomanenko avatar Oct 16 '20 05:10 tlikhomanenko