2016-06-29 1 views
4

私はUWPアプリケーションでCortanaを実装したいのですが、コマンドプレフィックスの後にランダムなコンテンツを求めるための解決策を見つけることができません。フレーズリストなしのUWP Cortana

私はPhraseListを動的に生成することができますが、ここではその点は重要ではありません。実際のVCDファイルは次のとおりです。

<?xml version="1.0" encoding="utf-8" ?> 
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.2"> 
<CommandSet xml:lang="fr" Name="MyAppCommand_fr"> 
<CommandPrefix>MyApp</CommandPrefix> 

<Command Name="showContent"> 

    <ListenFor RequireAppName="BeforePhrase">{randomcontent}</ListenFor> 
    <Feedback>Searching for {randomcontent}</Feedback> 
    <Navigate /> 
</Command> 

<!-- What I want here, is to get rid of PhraseList --> 
<PhraseList Label="randomcontent"> 
    <Item>Random Content</Item> 
</PhraseList> 

</CommandSet> 
</VoiceCommands> 

これを行う方法はありますか?

おかげので

答えて

2

あなたにも使用することができます:アンドリュー・ピリーと、このポストで彼の答えのための<PhraseTopic Label="randomcontent" Scenario="Dictation"> </PhraseTopic>

おかげでPhraseListを交換し

<PhraseTopic Label="searchParam" Scenario="Search"/> 

次のようになります。

<Command Name="showContent">  
    <ListenFor RequireAppName="BeforePhrase">{randomcontent}</ListenFor> 
    <Feedback>Searching for {randomcontent}</Feedback> 
    <Navigate /> 
</Command> 

<PhraseList Label="randomcontent" Scenario="Search"/> 
関連する問題