Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parameter format for DeepSpeech call? #56

Open
BraxnerM opened this issue Jul 6, 2019 · 1 comment
Open

Incorrect parameter format for DeepSpeech call? #56

BraxnerM opened this issue Jul 6, 2019 · 1 comment

Comments

@BraxnerM
Copy link

BraxnerM commented Jul 6, 2019

I think the args used to call deepspeech from speech.py are incorrect. They should specify which parameters they supply, i.e. the class ought to look like this ...

class DeepSpeech(object): MODEL_DIR = settings["speech"]["deepspeech"]["model_dir"] async def get_text(self, mp3_filename): wav_filename = await mp3_to_wav(mp3_filename) proc = await asyncio.create_subprocess_exec( *[ "deepspeech", '--model' , os.path.join(self.MODEL_DIR, "output_graph.pb"), '--alphabet' , os.path.join(self.MODEL_DIR, "alphabet.txt"), '--lm' , os.path.join(self.MODEL_DIR, "lm.binary"), '--trie' , os.path.join(self.MODEL_DIR, "trie"), '--audio' , wav_filename, ], stdout=asyncio.subprocess.PIPE, ) if not proc.returncode: data = await proc.stdout.readline() result = data.decode("ascii").rstrip() await proc.wait() if result: return result

@MacKey-255
Copy link

See my pull request ;) SAlu2s

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

No branches or pull requests

2 participants