How can I use selection-of with voice input in a Bixby input-view?

一笑奈何 提交于 2020-12-12 06:49:07

问题


Currently I have a prompt set up to collect a user's email. it offers the options stored in the user's profile in a selection-of input view. However, if a user is interacting with Bixby via voice (maybe their hands are full, for example), is there a way to give these options aliases so that the user can just say "Home" to get their home email or "Work" for their work email?

It looks like there is the ability to give it a spoken-summary(source) but is there something similar for naming a potential selection? I have not been able to use voice to select the value stored in spoken-selection so far.

Alternatively, it looks like the Autosuggest feature (have to scroll down in docs) has the ability to "fuzzy match" addresses based on the address type. Can a non-autosuggest input do something similar with email addresses or custom types?

Based on the example they give in the dialogue for "Exploring Choices" on this page, I think this is possible. I just can't find out how. Any ideas?

Here is my current view if that helps things:

input-view {
  match: contact.EmailInfo(this) {
    to-input: EmailResults
  }
  message ("What is your Email address?")
  render{
    selection-of (this) {
      where-each (emailInfo) {
        spoken-summary ("#{value(emailInfo.emailType)}")
        paragraph {
          value {
            template ("#{value(emailInfo.address)}")
          }
          style (Detail_M)
        }
      }
    }
  }
}

回答1:


It seems that you want to use voice command to make a selection from a list of items. There are build-in Bixby voice command such as "first one", "second one", "last one" when making selection from a list.

Currently, there is no keyword support to map "home" as "first one", if that is what you are asking. However, if you model your JS file to take "home" as a valid input argument, and map it to the correct email address, the user can just say "home" during input selection.

Hopefully this answers your question.



来源:https://stackoverflow.com/questions/56189529/how-can-i-use-selection-of-with-voice-input-in-a-bixby-input-view

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!