nicolas2k / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
1 stars 0 forks source link

Voice trigger not functioning for string that starts with "record a" #330

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a voice trigger "record a swing"
2. Deploy app
3. Attempt to use trigger

What is the expected output? What do you see instead?

Expect recognition of the new phrase. "Record a video" continues to work, but 
new trigger doesn't. Changing phrase to "get a swing" makes the new string work

What version of the product are you using? On what operating system?
Glass 1 XE12

Please provide any additional information below.

Config:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:versionCode="36"
          android:versionName="2.0" android:installLocation="auto" package="com.my_foo2">

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <application android:hardwareAccelerated="true" android:icon="@drawable/main_icon" android:label="@string/app_name" android:name="com.my_foo2.Application.Application" android:largeHeap="false">
        <uses-library
            android:name="com.google.android.glass"
            android:required="true" />

        <activity
            android:name="com.my_foo2.Glass.Activities.HomeMenuActivity"
            android:theme="@style/MenuTheme" />

        <service
            android:name="com.my_foo2.Glass.UiService"
            android:label="@string/app_name"
            android:icon="@drawable/main_icon"
            android:enabled="true" >
            <intent-filter>
                <action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
            </intent-filter>
            <meta-data
                android:name="com.google.android.glass.VoiceTrigger"
                android:resource="@xml/sb_show" />
        </service>

    </application>

</manifest>

sb_show:
<trigger keyword="@string/show_voice_trigger"/>

show_voice_trigger is "record a swing" or "get a swing"

Additionally, on deploy, I see the following exception:
12-27 18:11:31.372      460-460/? W/VoiceTrigger﹕ Unable to get info for 
trigger: ComponentInfo{com.my_foo2/com.my_foo2.Glass.UiService}
android.content.pm.PackageManager$NameNotFoundException: 
ComponentInfo{com.my_foo2/com.my_foo2.Glass.UiService}
        at android.app.ApplicationPackageManager.getServiceInfo(ApplicationPackageManager.java:253)
        at com.google.android.glass.app.VoiceTrigger.getInfo(VoiceTrigger.java:290)
        at com.google.android.glass.app.VoiceTrigger.loadLabel(VoiceTrigger.java:263)
        at com.google.glass.home.voice.menu.MainMenuGrammarLoader.getDisambiguationGraph(MainMenuGrammarLoader.java:124)
        at com.google.glass.home.voice.menu.MainMenuGrammarLoader.reloadDisambiguationConfigs(MainMenuGrammarLoader.java:77)
        at com.google.glass.home.voice.menu.MainMenuGrammarLoader.reloadGrammars(MainMenuGrammarLoader.java:73)
        at com.google.glass.home.voice.menu.MainMenuGrammarLoader.registerForUpdates(MainMenuGrammarLoader.java:137)
        at com.google.glass.input.VoiceInputHelper.registerGrammarLoaders(VoiceInputHelper.java:576)
        at com.google.glass.input.VoiceInputHelper.dispatchVoiceServiceConnected(VoiceInputHelper.java:571)
        at com.google.glass.input.VoiceInputHelper.access$400(VoiceInputHelper.java:41)
        at com.google.glass.input.VoiceInputHelper$2.handleMessage(VoiceInputHelper.java:171)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:4424)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
        at dalvik.system.NativeStart.main(Native Method)

Changing the trigger doesn't make the exception go away, but does make it work.

Original issue reported on code.google.com by kol...@gmail.com on 30 Dec 2013 at 4:14

GoogleCodeExporter commented 8 years ago
Some additional info - this seems to only be related to the word "record," not 
just the fact that there's an already registered trigger that starts the same 
way.

changed trigger to "take a swing" (which is similar to "take a picture"): works 
fine
changed trigger back to "record a swing": stops working
changed trigger to "record swings": stops working
changed trigger back to "take a swing": works fine

Original comment by kol...@gmail.com on 3 Jan 2014 at 3:30

GoogleCodeExporter commented 8 years ago
Also appears to be an issue with voice triggers that start with "start a".

Original comment by dustinat...@gmail.com on 3 Jan 2014 at 11:27

GoogleCodeExporter commented 8 years ago
When you say "stops working", do you mean that the voice trigger is completely 
ignored (no application is launched), or something else?

Is there any other information in logcat when the voice trigger fails to work 
correctly, aside from the exception you pasted?

Original comment by allev...@google.com on 3 Jan 2014 at 11:31

GoogleCodeExporter commented 8 years ago
Yes, when I say stops working, I mean it's ignored completely, with other 
triggers working normally. Also, the trigger string shows up in the "ok glass" 
menu if I select it manually.

I'm attaching the full logcat, starting from me starting the look up gesture, 
when configured for "record a swing":

Original comment by kol...@gmail.com on 3 Jan 2014 at 11:38

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the extra info!

Original comment by allev...@google.com on 3 Jan 2014 at 11:52