2014-02-27 2 views
0

나는 Windows phone 8 음성 명령에서 선택적 구를 가질 수있는 방법이 있는지 알고 싶었습니다. 나는 이런 식으로 뭔가 의미 :windows phone 음성 명령 구문

<Command Name="actoin"> 
    <Example>he goes to school</Example> 
    <ListenFor> he goes to school [{with}] [{time}] </ListenFor> 
    <Feedback>ok!</Feedback> 
    <Navigate Target="MainPage.xaml"/> 
</Command> 

<PhraseList Label="with"> 
    <Item>by bus</Item> 
    <Item>by tax</Item> 
    <Item>by his father</Item> 
</PhraseList> 
<PhraseList Label="time"> 
    <Item>sometimes</Item> 
    <Item>always<Item> 
</PhraseList> 

실제로 내가 withtime가 선택하게하고 각 조합에 대해 별도의 명령을 작성 피하려고!

감사

답변

1

당신은 명령 당 (10까지) 여러 <ListenFor> 요소를 가질 수있다; 당신은 그런 식으로 옵션을 만들 수 있습니다. 예를 들어

:

<Command Name="action"> 
    <Example>he goes to school</Example> 
    <ListenFor> he goes to school {with} {time} </ListenFor> 
    <ListenFor> he goes to school {time} </ListenFor> 
    <ListenFor> he goes to school {with} </ListenFor> 
    <ListenFor> he goes to school </ListenFor> 
    <Feedback>ok!</Feedback> 
    <Navigate Target="MainPage.xaml"/> 
</Command> 

<PhraseList Label="with"> 
    <Item>by bus</Item> 
    <Item>by tax</Item> 
    <Item>by his father</Item> 
</PhraseList> 
<PhraseList Label="time"> 
    <Item>sometimes</Item> 
    <Item>always<Item> 
</PhraseList> 
관련 문제