simple-speech-recognition icon indicating copy to clipboard operation
simple-speech-recognition copied to clipboard

TypeError: a bytes-like object is required, not 'str'

Open leninchris opened this issue 7 years ago • 2 comments

Getting the below error:

cmu_sphinx4.py", line 87, in transcript_stream if 'WARNING dictionary' in output and 'Missing word:' in output:

TypeError: a bytes-like object is required, not 'str'

leninchris avatar May 23 '18 20:05 leninchris

just replace "if 'WARNING dictionary' in output and 'Missing word:' in output:" in the cmu_sphinx4.py with "if b'WARNING dictionary' in output and b'Missing word:' in output:" and repuild the cmu_sphinx4.py file i.e., specifying the bytes object.

nasirbashak avatar Sep 29 '18 09:09 nasirbashak

Hi @leninchris Simply rewrite if b'WARNING dictionary' in output and b'Missing word:' in output: continue if b'Falling back to non-recursive partition' in output: continue into existing cmu_sphinx4.py file

ankitathummar avatar Nov 01 '18 12:11 ankitathummar