signal = np.memmap(file_path, dtype='h', mode='r') #signal is an array of type np.int16
signal = signal.astype(np.float)
signal /= 2. ** 15
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
There is no numerical issues with the MFCC calculations: the MFCC extraction in bob.bio.spear is coupled with the wave reader of spear, that is the scipy wave reader.If you want to implement your own wave reader, make sure to convert the output to match the scipy wave reader output.
On Fri, Oct 21, 2016 at 12:53 PM, Francesco Tuveri <ftu...@gmail.com> wrote:
I think there is some numeric issue with the MFCC calculations. I am using the Python API of bob.bio.spear to extract MFCCs and sometimes I get zero-valued coefficients from a signal, even from segments of the signal where there is no silence.The problem happens when I pass to bob.bio.spear.extractor a signal is scaled to [0,1]. For example I read 16 bit PCM files and scale them with the following code:
signal = np.memmap(file_path, dtype='h', mode='r') #signal is an array of type np.int16
signal = signal.astype(np.float)
signal /= 2. ** 15With this code, for some PCM files I get a lot of zero-valued MFCCs, even for the part of the signal where there is no silence.This problem does not happen if i don't scale the signal and just pass the np.int16 array (casted to float just to be safe) to the MFCC extractor.
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+...@googlegroups.com.
--
-- You received this message because you are subscribed to the Google Groups bob-devel group. To post to this group, send email to bob-...@googlegroups.com. To unsubscribe from this group, send email to bob-devel+unsubscribe@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/bob-devel or directly the project website at http://idiap.github.com/bob/
---
You received this message because you are subscribed to the Google Groups "bob-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bob-devel+unsubscribe@googlegroups.com.