How to find program name for corresponding grammar filename [Android Studio emulator]

91 views
Skip to first unread message

Justin Hall

unread,
Mar 11, 2020, 1:11:27 PM3/11/20
to Dragonfly Speech Recognition
Hi, I'm using Dragon plus dragonfly quite successfully with Android Studio, but I'm struggling to get it working with the android emulator. Specifically I don't know what to name the file and the corresponding grammar_context name.

My android studio grammar file is named "studio64.py" as that is the name of the executable and that works fine.

On the other hand the emulator seems to be named "emulator.exe" ( as seen in the task manager) but the corresponding "emulator.py" never gets loaded. Am I using the right filename? Am I using the correct name in the grammar context: 'grammar_context = AppContext(executable="emulator")'
does this have something to do with emulator not being launched as a stand-alone executable? It gets launched from within android studio.

Thank you


dwk

unread,
Mar 11, 2020, 1:19:10 PM3/11/20
to dragonf...@googlegroups.com
Hi Justin,

Consider naming your python file something else, if there is a built-in module called emulator this could cause trouble. It doesn't have to be named the same as the executable in which it will be activated. As for AppContext, I imagine it would determine the name of the currently selected graphical WIN64 window (on Linux it looks for the current X11 window title). So I guess that emulator.exe probably doesn't have a graphical interface, just a window pane inside Android Studio, and you would still see the Android Studio executable "selected".

You can add a command to verbally mode switch or enable / disable the emulator commands. Or print the app context information and see if there's any way to distinguish the main window from the emulator window.

--
You received this message because you are subscribed to the Google Groups "Dragonfly Speech Recognition" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dragonflyspee...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dragonflyspeech/f0e37e23-ebae-45ce-a65d-979027fdf6ec%40googlegroups.com.

Justin Hall

unread,
Mar 12, 2020, 12:26:34 PM3/12/20
to Dragonfly Speech Recognition
Thank you for that David, I'm not quite clear on how to load a grammar for a specific application, other than naming it the same as the executable; how do I do that? Thank you
To unsubscribe from this group and stop receiving emails from it, send an email to dragonf...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages