ERROR: During the execution, an exception was raised: `bob.ap.Energy'

17 views
Skip to first unread message

Nathália Batista

unread,
Feb 4, 2018, 11:57:04 AM2/4/18
to bob-devel
Hi,

I'm getting the following error "bob.bio.base@2018-02-04 14:32:54,726 -- ERROR: During the execution, an exception was raised: `bob.ap.Energy' only supports 1D 64-bit float arrays for input array `input'" when I try to run an spear experiment.
The files I'm using to process are .WAV files:

Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

Someone does know how can I solve this issue?

Thank you

 

Tiago Freitas Pereira

unread,
Feb 4, 2018, 12:43:12 PM2/4/18
to bob-...@googlegroups.com
Hi Nathália,

I'm not an audio guy, but I think bob.ap.Energy supports audios with one channel only (not 2 in your case).

Can someone confirm that??


Cheers

--
-- 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.



--
Tiago

Pavel Korshunov

unread,
Feb 4, 2018, 2:31:58 PM2/4/18
to bob-...@googlegroups.com
Hi Nathalia,

Bob spear can only work with mono (1 channel) 16 KHz audio. It means you'd need to convert all of the files to this format. For that, you can use ffmpeg as follows:

ffmpeg -i  input_file.wav -ac 1 -ar 16000 output_file.wav

You can also call ffmpeg from python script using subprocess call:

import subprocess
command = "ffmpeg -i " + input_file + " -ac 1 -ar 16000 " + output_file
subprocess.call(command, shell=True)

Best,
Pavel
Message has been deleted

Pavel Korshunov

unread,
Feb 5, 2018, 4:44:08 AM2/5/18
to bob-...@googlegroups.com
Hi Nathalia,

Normally, this ffmpeg command would combine 2 channels into one mono audio, but I don't know what kind of recordings you have. You can use other fmpeg commands that will lead to a correct mono audio, here is a good list: https://trac.ffmpeg.org/wiki/AudioChannelManipulation

Bob's requirement for input audio to be 1 channel 16KHz is a typical requirement to voice recordings that is used in most of the voice biometric systems.

Best,
Pavel

On Mon, Feb 5, 2018 at 12:17 AM, Nathália Batista <natha...@gmail.com> wrote:
Hi Pavel,

Unfortunately, the convert process stereo files to mono files removed most part of the information in the audio file. Some files I can only listen the beginning part.
Do you have other option to solve this problem?

Thank you

--
-- 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.

For more options, visit https://groups.google.com/d/optout.



--
Tiago

--
-- 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.

For more options, visit https://groups.google.com/d/optout.

Nathália Batista

unread,
Feb 5, 2018, 11:55:55 AM2/5/18
to bob-devel
Hi Pavel,

I converted all files to mono using ffmpeg method you explained before and processed them. But, when the extractor phase is occurring I'm getting the error: ".hdf5 file was not found" for some .wav files.
So, I believe that in the preprocessing phase some files are not being processed due unknown reason , so the .hdf5 is not generated.
Did you already faced a issue like this before?

Thank you

Pavel Korshunov

unread,
Feb 5, 2018, 6:21:02 PM2/5/18
to bob-...@googlegroups.com
Hi Nathalia,

If at extractor stage you have a missing hdf5 file, it was not generated by preprocessing stage. Most probably it means the file was empty with no sound. You should examine the corresponding WAV files and try to play them. In any case, you should just dig in, debug a little of what kind of data you have, and what the results of preprocessing stage are.

Pavel

--
-- 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.
Reply all
Reply to author
Forward
0 new messages