Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

TypeError: 'bool' object is not iterable #14

Open
MrHobbits opened this issue May 22, 2020 · 2 comments
Open

TypeError: 'bool' object is not iterable #14

MrHobbits opened this issue May 22, 2020 · 2 comments

Comments

@MrHobbits
Copy link

MrHobbits commented May 22, 2020

Hi, fair warning, I'm new to this module and I think I'm understanding it well enough by your examples to get it going. Please correct me if I'm not using it right.

My intention is to analyze the sample file you provided on the docs page (small_audio.wav), but when I run this using python 3.6 I get this error:

Traceback (most recent call last):
  File "times.py", line 5, in <module>
    indexer.index_audio(basename ='small_audio.wav')
  File "/home/mrhobbits/.local/lib/python3.6/site-packages/SimpleAudioIndexer/__init__.py", line 1108, in index_audio
    self._index_audio_ibm(*args, **kwargs)
  File "/home/mrhobbits/.local/lib/python3.6/site-packages/SimpleAudioIndexer/__init__.py", line 953, in _index_audio_ibm
    self._timestamp_regulator()
  File "/home/mrhobbits/.local/lib/python3.6/site-packages/SimpleAudioIndexer/__init__.py", line 1167, in _timestamp_regulator
    timestamp_basename][0]
TypeError: 'bool' object is not iterable

Here is the code I'm using, it doesn't get past the 4th line, so the rest is omitted.

from SimpleAudioIndexer import SimpleAudioIndexer as sai
indexer = sai(mode="ibm", src_dir="/home/mrhobbits/programming/pythonStuff/recordSpeakerAudio",
username_ibm="", password_ibm="")
indexer.index_audio(basename ='small_audio.wav')

Directory information:

mrhobbits@hobbits:~/programming/pythonStuff/recordSpeakerAudio$ ls -1
small_audio.wav
times.py
mrhobbits@hobbits:~/programming/pythonStuff/recordSpeakerAudio$ pwd
/home/mrhobbits/programming/pythonStuff/recordSpeakerAudio

System: Ubuntu 18.04.4 LTS
Python version(s) 3.6 and 3.7
SAI version: 1.0.0

@glauco-oliveira
Copy link

Has anyone managed to find out or the reason for the inconsistency?

@aalireza
Copy link
Owner

IBM has changed their APIs multiple times since I first wrote this. It’s difficult to keep up with them! I’ll accept pull requests if you want to work on it. Unfortunately I don’t have enough time myself to work on it at the moment.

Also, I really rather redo this from scratch sometime in the next couple of months, as the tools I’m using here were okay for 2016, but there are now much better ways to index audio.

If you really need to search within audio my two suggestions would be either use IBM directly (the file splitting logic might still work), or check DeepSpeech out - might be a bit rough on the edges but it has much higher accuracy than CMU Sphinx.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants