gpt4 book ai didi

android - 谷歌眼镜 : Starting an activity with "Ok Glass, Command"

转载 作者:太空宇宙 更新时间:2023-11-03 10:47:25 24 4
gpt4 key购买 nike

按照 Google 指南的指示,使用此代码段会显示一个额外的语音输入屏幕。

<activity
android:name="ca.lvin.myfirstglassapp.MyPuppiesSlideshowActivity "
android:label="@string/app_name" >
<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/my_voice_trigger" />
</activity>

我想要的:

  1. “好的,格拉斯”
  2. “给我看看小狗的照片”(根据 https://developers.google.com/glass/develop/gdk/ui/theme-widgets )
  3. MyPuppiesSlideshowActivity 启动

我得到的:

  1. “好的,格拉斯”
  2. “给我看看小狗的照片”
  3. 出现要求更多输入的麦克风
  4. 对着麦克风屏幕说任何话
  5. MyPuppiesSlideshowActivity 启动

谁能帮我去掉这两个额外的步骤?

与此相关:Voice command for apps in Google Glass?但由于缺乏声誉,我无法对原始线程发表评论...


已解决!
我从这个站点逐字复制了代码
https://developers.google.com/glass/develop/gdk/input/voice

<trigger keyword="@string/glass_voice_trigger">
<input prompt="@string/glass_voice_prompt" />
</trigger>

输入标签是问题所在。删除它会处理提示。
谢谢!

最佳答案

如果没有看到您的语音触发器 XML,我无法确定,但听起来您可能已经编写了触发器以通过包含以下行来期望额外的输入:

<input prompt="@string/glass_voice_prompt" />

从触发器中删除该行,它不会提示您。

关于android - 谷歌眼镜 : Starting an activity with "Ok Glass, Command",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20557320/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com