rogerkibbe/bixby_bart_commuter

Demonstrate building speech through dialog files

DogeThis opened this issue · 0 comments

The walkthrough talks about using the dialog file, like this

dialog (Result) {
 match: TrainSchedule (schedule) {
  from-output: SearchForTrains (trainSchedule)
 }
 template("BART Schedule:")
  {speech("${value(schedule.speech)}") }
}

another pattern would be to build out the schedule text in the speech dialog file, such as (model names made up)

{speech("The ${value(schedule.departingTrain)} leaves at ${value(schedule.departingTime)} and arrives at ....

This has benefits to localization, so that localizers don't need to touch the JS to build their localized strings, and just create a new dialog file for their locale.