home-assistant / ada

Hey Ada!
Apache License 2.0
103 stars 18 forks source link

Extract options object #8

Closed balloob closed 4 years ago

balloob commented 4 years ago

Extract an options object. For now still hardcode it with original values in __main__.py.

Instead of requiring porcupine path to be passed in, resolve it from the pvporcupine package. @pvizeli why can't we import pvporcupine directly? Can we document that somewhere.

Will leave it up to @pvizeli how we want to fill that data in there, all OS vars? Command line args?

Fix #6

pvizeli commented 4 years ago

We can't import it directly because it fails on the generic ARM platform. They have helper until they run if you import it directly and this util fails. I would love if they would not do that.

However, since they never responded to us, we move in the future to a different hotword provider.

balloob commented 4 years ago

So the way I had structured resolving the import was by doing it like you did, except that I dynamically found the install dir. I didn't import their Python util package

pvizeli commented 4 years ago

exactly, yes