SlideShare a Scribd company logo
1 of 21
Download to read offline
Fonctions vocales sous Windows Phone :
intégrez votre application à Cortana !
Caroline Constantin
Microsoft - Senior Program Manager
@caroc
Jean-Sébastien Dupuy
Microsoft – Developer Evangelist
@dupuyjs
tech.days 2015#mstechdays
 Intégration Cortana
 Reconnaissance vocale
 Synthèse vocale
Cortana
Dr. Catherine Elizabeth Halsey
tech.days 2015#mstechdays
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.1">
<CommandSet xml:lang="en-us" Name="englishCommands">
<CommandPrefix>MSDN</CommandPrefix>
<Example>How do I add Voice Commands to my application</Example>
<Command Name="FindText">
<Example>Find Install Voice Command Sets</Example>
<ListenFor>Search</ListenFor>
<ListenFor>Search for {dictatedSearchTerms}</ListenFor>
<ListenFor>Find</ListenFor>
<ListenFor>Find {dictatedSearchTerms}</ListenFor>
<Feedback>Search on MSDN</Feedback>
<Navigate Target="MainPage.xaml" />
</Command>
<Command Name="nlpCommand">
<Example>How do I add Voice Commands to my application</Example>
<ListenFor>{dictatedVoiceCommandText}</ListenFor>
<Feedback>Starting MSDN...</Feedback>
<Navigate Target="MainPage.xaml" />
</Command>
<PhraseTopic Label="dictatedVoiceCommandText" Scenario="Dictation">
<Subject>MSDN</Subject>
</PhraseTopic>
<PhraseTopic Label="dictatedSearchTerms" Scenario="Search">
<Subject>MSDN</Subject>
</PhraseTopic>
</CommandSet>
</VoiceCommands>
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.0">
<CommandSet xml:lang="en-us" Name="englishCommands">
<CommandPrefix>MSDN</CommandPrefix>
<Example>Find Voice Commands</Example>
<Command Name="FindText">
<Example>Find Windows Phone</Example>
<ListenFor>Search</ListenFor>
<ListenFor>Search {*}</ListenFor>
<ListenFor>Search for {listSearchTerms}</ListenFor>
<ListenFor>Find</ListenFor>
<ListenFor>Find {*}</ListenFor>
<ListenFor>Find {listSearchTerms}</ListenFor>
<Feedback>Search on MSDN</Feedback>
<Navigate Target="MainPage.xaml" />
</Command>
<PhraseList Label="listSearchTerms" Disambiguate="false">
<Item>Voice Commands</Item>
<Item>Windows Phone</Item>
</PhraseList>
</CommandSet>
</VoiceCommands>
<?xml version="1.0" encoding="utf-8"?>
<VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.0">
<CommandSet xml:lang="en-us" Name="englishCommands">
<CommandPrefix>MSDN</CommandPrefix>
<Example>How do I add Voice Commands to my application</Example>
<Command Name="FindText">
<Example>Find Install Voice Command Sets</Example>
<ListenFor>Search</ListenFor>
<ListenFor>Search for {dictatedSearchTerms}</ListenFor>
<ListenFor>Find</ListenFor>
<ListenFor>Find {dictatedSearchTerms}</ListenFor>
<Feedback>Search on MSDN</Feedback>
<Navigate Target="MainPage.xaml" />
</Command>
<PhraseTopic Label="dictatedSearchTerms" Scenario="Search">
<Subject>MSDN</Subject>
</PhraseTopic>
</CommandSet>
</VoiceCommands>
Windows Phone 8.0 Windows Phone 8.1
Simple Scenarios, Limited Accuracy More Powerful, Easier, More Accurate
private async void
// SHOULD BE PERFORMED UNDER TRY/CATCH
Uri new ms-appx:///vcd.xml UriKind.Absolute
await
Windows Phone Silverlight Apps on Windows Phone 8.1
Windows Runtime Apps on Windows Phone 8.1
private async void
// SHOULD BE PERFORMED UNDER TRY/CATCH
Uri uriVoiceCommands = new Uri("ms-appx:///vcd.xml", UriKind.Absolute);
StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uriVoiceCommands);
await VoiceCommandManager.InstallCommandSetsFromStorageFileAsync(file);
❶
❷
// Windows Phone Silverlight App, in MainPage.xaml.cs
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
if (e.NavigationMode == System.Windows.Navigation.NavigationMode.New)
{
string recoText = null; // What did the user say? e.g. MSDN, "Find Windows Phone Voice Commands"
NavigationContext.QueryString.TryGetValue("reco", out recoText);
string voiceCommandName = null; // Which command was recognized in the VCD.XML file? e.g. "FindText"
NavigationContext.QueryString.TryGetValue("voiceCommandName", out voiceCommandName);
string searchTerms = null; // What did the user say, for named phrase topic or list "slots"? e.g. "Windows Phone Voice Commands"
NavigationContext.QueryString.TryGetValue("dictatedSearchTerms", out searchTerms);
switch (voiceCommandName) // What command launched the app?
{
case "FindText":
HandleFindText(searchTerms);
break;
case "nlpCommand":
HandleNlpCommand(recoText);
break;
}
}
}
❶
❷
❸
// Windows Runtime App on Windows Phone 8.1, inside OnActivated override in App class
if (args.Kind == ActivationKind.VoiceCommand)
{
VoiceCommandActivatedEventArgs vcArgs = (VoiceCommandActivatedEventArgs)args;
string voiceCommandName = vcArgs.Result.RulePath.First(); // What command launched the app?
switch (voiceCommandName) // Navigate to right page for the voice command
{
case "FindText": // User said "find" or "search"
rootFrame.Navigate(typeof(MSDN.FindText), vcArgs.Result);
break;
case "nlpCommand": // User said something else
rootFrame.Navigate(typeof(MSDN.NlpCommand), vcArgs.Result);
break;
}
}
tech.days 2015#mstechdays
tech.days 2015#mstechdays
 Collaboration entre Bing, Google, Yahoo! et Yandex
 Effort commun pour structurer les données (et faire
l’objet de traitement automatisés)
 Disponible aux formats microdata, JSON-LD et RDFa
 Exemples: Events, Reviews, Recipes, Package
Tracking
// Windows Phone Store App
// Synthesis
<!--MediaElement in xaml file-->
<MediaElement Name="audioPlayer" AutoPlay="True" .../>
// C# code behind
// Function to speak a text string
private async void SpeakText(MediaElement audioPlayer, string textToSpeak)
{
SpeechSynthesizer synthesizer = new SpeechSynthesizer();
SpeechSynthesisStream ttsStream = await synthesizer.SynthesizeTextToStreamAsync(textToSpeak);
audioPlayer.SetSource(ttsStream, ""); // This starts the player because AutoPlay="True"
}
// Windows Phone Store App
// Recognition
private async Task<SpeechRecognitionResult> RecognizeSpeech()
{
SpeechRecognizer recognizer = new SpeechRecognizer();
// One of three Constraint types available
SpeechRecognitionTopicConstraint topicConstraint
= new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.WebSearch, "MSDN");
recognizer.Constraints.Add(topicConstraint);
await recognizer.CompileConstraintsAsync(); // Required
// Put up UI and recognize user's utterance
SpeechRecognitionResult result = await recognizer.RecognizeWithUIAsync();
return result;
}
// Calling code uses result.RecognitionResult.Text or
// result.RecognitionResult.SemanticInterpretation
tech.days 2015#mstechdays
© 2015 Microsoft Corporation. All rights reserved.
tech days•
2015
#mstechdays techdays.microsoft.fr

More Related Content

Viewers also liked

Vom Widerstand Zum Arduino
Vom Widerstand Zum ArduinoVom Widerstand Zum Arduino
Vom Widerstand Zum ArduinoLars Gregori
 
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...TUNEPS HAICOP
 
Circulaire DPI ARS 29/07/2013
Circulaire DPI ARS 29/07/2013Circulaire DPI ARS 29/07/2013
Circulaire DPI ARS 29/07/2013Market iT
 
[Ege hauts de france] les productions animales dans la tourmente des matières...
[Ege hauts de france] les productions animales dans la tourmente des matières...[Ege hauts de france] les productions animales dans la tourmente des matières...
[Ege hauts de france] les productions animales dans la tourmente des matières...Institut de l'Elevage - Idele
 
Les drones dans le milieu professionnel
Les drones dans le milieu professionnelLes drones dans le milieu professionnel
Les drones dans le milieu professionnelJosselin Lacroix
 
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...ASIP Santé
 
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"ASIP Santé
 

Viewers also liked (13)

Vom Widerstand Zum Arduino
Vom Widerstand Zum ArduinoVom Widerstand Zum Arduino
Vom Widerstand Zum Arduino
 
Android: Les intents
Android: Les intentsAndroid: Les intents
Android: Les intents
 
Gns3final
Gns3finalGns3final
Gns3final
 
[Ege hauts de france] synthèse ateliers
[Ege hauts de france] synthèse ateliers[Ege hauts de france] synthèse ateliers
[Ege hauts de france] synthèse ateliers
 
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...
LE LANCEMENT D’UN NOUVEL ACCORD-CADRE Fourniture d’électricité, une étude de ...
 
CECOSDA Centre Communication Réseau alerte écologique Cameroun journalistes m...
CECOSDA Centre Communication Réseau alerte écologique Cameroun journalistes m...CECOSDA Centre Communication Réseau alerte écologique Cameroun journalistes m...
CECOSDA Centre Communication Réseau alerte écologique Cameroun journalistes m...
 
Circulaire DPI ARS 29/07/2013
Circulaire DPI ARS 29/07/2013Circulaire DPI ARS 29/07/2013
Circulaire DPI ARS 29/07/2013
 
Atelier 1 introduction - Enjeux et questions clés
Atelier 1 introduction - Enjeux et questions clésAtelier 1 introduction - Enjeux et questions clés
Atelier 1 introduction - Enjeux et questions clés
 
[Ege hauts de france] les productions animales dans la tourmente des matières...
[Ege hauts de france] les productions animales dans la tourmente des matières...[Ege hauts de france] les productions animales dans la tourmente des matières...
[Ege hauts de france] les productions animales dans la tourmente des matières...
 
Les drones dans le milieu professionnel
Les drones dans le milieu professionnelLes drones dans le milieu professionnel
Les drones dans le milieu professionnel
 
Carte Professionnel
Carte ProfessionnelCarte Professionnel
Carte Professionnel
 
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
2013-06-13 ASIP Santé RIR "Etat d’avancement des travaux ROR (Répertoire Opér...
 
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"2013-05-28 ASIP Santé HIT  "Actualité juridique de la e-santé"
2013-05-28 ASIP Santé HIT "Actualité juridique de la e-santé"
 

Similar to Fonctions vocales sous Windows Phone : intégrez votre application à Cortana !

TDC 2014 - Cortana
TDC 2014 - CortanaTDC 2014 - Cortana
TDC 2014 - Cortanatmonaco
 
Integrando nuestra Aplicación Windows Phone con Cortana
Integrando nuestra Aplicación Windows Phone con CortanaIntegrando nuestra Aplicación Windows Phone con Cortana
Integrando nuestra Aplicación Windows Phone con CortanaJavier Suárez Ruiz
 
Hands free with cortana
Hands free with cortanaHands free with cortana
Hands free with cortanaFiyaz Hasan
 
Cortana for Windows Phone
Cortana for Windows PhoneCortana for Windows Phone
Cortana for Windows PhoneKunal Chowdhury
 
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...Nick Landry
 
Integrating cortana with wp8 app
Integrating cortana with wp8 appIntegrating cortana with wp8 app
Integrating cortana with wp8 appAbhishek Sur
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8Marco Massarelli
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8Appsterdam Milan
 
Developing with Speech and Voice Recognition in Mobile Apps
Developing with Speech and Voice Recognition in Mobile AppsDeveloping with Speech and Voice Recognition in Mobile Apps
Developing with Speech and Voice Recognition in Mobile AppsNick Landry
 
Building Windows 10 Universal Apps with Speech and Cortana
Building Windows 10 Universal Apps with Speech and CortanaBuilding Windows 10 Universal Apps with Speech and Cortana
Building Windows 10 Universal Apps with Speech and CortanaNick Landry
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechOliver Scheer
 
Lev's KC-DC Presentation
Lev's KC-DC PresentationLev's KC-DC Presentation
Lev's KC-DC PresentationLev Ginsburg
 
Code Camp - Presentation - Windows 10 - (Cortana)
Code Camp - Presentation - Windows 10 - (Cortana)Code Camp - Presentation - Windows 10 - (Cortana)
Code Camp - Presentation - Windows 10 - (Cortana)Edward Moemeka
 
ITT 2014 - Matt Brenner- Localization 2.0
ITT 2014 - Matt Brenner- Localization 2.0ITT 2014 - Matt Brenner- Localization 2.0
ITT 2014 - Matt Brenner- Localization 2.0Istanbul Tech Talks
 
FireWatir - Web Application Testing Using Ruby and Firefox
FireWatir - Web Application Testing Using Ruby and FirefoxFireWatir - Web Application Testing Using Ruby and Firefox
FireWatir - Web Application Testing Using Ruby and Firefoxangrez
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 

Similar to Fonctions vocales sous Windows Phone : intégrez votre application à Cortana ! (20)

TDC 2014 - Cortana
TDC 2014 - CortanaTDC 2014 - Cortana
TDC 2014 - Cortana
 
Integrando nuestra Aplicación Windows Phone con Cortana
Integrando nuestra Aplicación Windows Phone con CortanaIntegrando nuestra Aplicación Windows Phone con Cortana
Integrando nuestra Aplicación Windows Phone con Cortana
 
Hey Cortana!
Hey Cortana!Hey Cortana!
Hey Cortana!
 
Hands free with cortana
Hands free with cortanaHands free with cortana
Hands free with cortana
 
Cortana for Windows Phone
Cortana for Windows PhoneCortana for Windows Phone
Cortana for Windows Phone
 
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...
Beyond Cortana & Siri: Using Speech Recognition & Speech Synthesis for the Ne...
 
Integrating cortana with wp8 app
Integrating cortana with wp8 appIntegrating cortana with wp8 app
Integrating cortana with wp8 app
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8
 
Speech for Windows Phone 8
Speech for Windows Phone 8Speech for Windows Phone 8
Speech for Windows Phone 8
 
Developing with Speech and Voice Recognition in Mobile Apps
Developing with Speech and Voice Recognition in Mobile AppsDeveloping with Speech and Voice Recognition in Mobile Apps
Developing with Speech and Voice Recognition in Mobile Apps
 
Building Windows 10 Universal Apps with Speech and Cortana
Building Windows 10 Universal Apps with Speech and CortanaBuilding Windows 10 Universal Apps with Speech and Cortana
Building Windows 10 Universal Apps with Speech and Cortana
 
Windows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using SpeechWindows Phone 8 - 14 Using Speech
Windows Phone 8 - 14 Using Speech
 
Lev's KC-DC Presentation
Lev's KC-DC PresentationLev's KC-DC Presentation
Lev's KC-DC Presentation
 
Droidcon ppt
Droidcon pptDroidcon ppt
Droidcon ppt
 
Code Camp - Presentation - Windows 10 - (Cortana)
Code Camp - Presentation - Windows 10 - (Cortana)Code Camp - Presentation - Windows 10 - (Cortana)
Code Camp - Presentation - Windows 10 - (Cortana)
 
Tml for Laravel
Tml for LaravelTml for Laravel
Tml for Laravel
 
ITT 2014 - Matt Brenner- Localization 2.0
ITT 2014 - Matt Brenner- Localization 2.0ITT 2014 - Matt Brenner- Localization 2.0
ITT 2014 - Matt Brenner- Localization 2.0
 
Introduzione al TDD
Introduzione al TDDIntroduzione al TDD
Introduzione al TDD
 
FireWatir - Web Application Testing Using Ruby and Firefox
FireWatir - Web Application Testing Using Ruby and FirefoxFireWatir - Web Application Testing Using Ruby and Firefox
FireWatir - Web Application Testing Using Ruby and Firefox
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 

More from Microsoft

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuMicrosoft
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaSMicrosoft
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileMicrosoft
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Microsoft
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Microsoft
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Microsoft
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à ZMicrosoft
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Microsoft
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Microsoft
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsMicrosoft
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Microsoft
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryMicrosoft
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Microsoft
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Microsoft
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Microsoft
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET CoreMicrosoft
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Microsoft
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Microsoft
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursMicrosoft
 

More from Microsoft (20)

Uwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieuUwp + Xamarin : Du nouveau en terre du milieu
Uwp + Xamarin : Du nouveau en terre du milieu
 
La Blockchain pas à PaaS
La Blockchain pas à PaaSLa Blockchain pas à PaaS
La Blockchain pas à PaaS
 
Tester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobileTester, Monitorer et Déployer son application mobile
Tester, Monitorer et Déployer son application mobile
 
Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo Windows 10, un an après – Nouveautés & Démo
Windows 10, un an après – Nouveautés & Démo
 
Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.Prenez votre pied avec les bots et cognitive services.
Prenez votre pied avec les bots et cognitive services.
 
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
Office 365 Dev PnP & PowerShell : exploitez enfin le potentiel de votre écosy...
 
Créer un bot de A à Z
Créer un bot de A à ZCréer un bot de A à Z
Créer un bot de A à Z
 
Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?Microsoft Composition, pierre angulaire de vos applications ?
Microsoft Composition, pierre angulaire de vos applications ?
 
Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016Les nouveautés SQL Server 2016
Les nouveautés SQL Server 2016
 
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
Conteneurs Linux ou Windows : quelles approches pour des IT agiles ?
 
Administration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs AnalyticsAdministration et supervision depuis le Cloud avec Azure Logs Analytics
Administration et supervision depuis le Cloud avec Azure Logs Analytics
 
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
Retour d'expérience de projets Azure IoT "large scale" (MicroServices, portag...
 
Plan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site RecoveryPlan de Reprise d'Activité avec Azure Site Recovery
Plan de Reprise d'Activité avec Azure Site Recovery
 
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
Modélisation, déploiement et gestion des infrastructures Cloud : outils et bo...
 
Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.Transformation de la représentation : De la VR à la RA, aller & retour.
Transformation de la représentation : De la VR à la RA, aller & retour.
 
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
Quelles architectures pour vos applications Cloud, de la VM au conteneur : ça...
 
Introduction à ASP.NET Core
Introduction à ASP.NET CoreIntroduction à ASP.NET Core
Introduction à ASP.NET Core
 
Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?Open Source et Microsoft Azure, rêve ou réalité ?
Open Source et Microsoft Azure, rêve ou réalité ?
 
Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...Comment développer sur la console Xbox One avec une application Universal Win...
Comment développer sur la console Xbox One avec une application Universal Win...
 
Azure Service Fabric pour les développeurs
Azure Service Fabric pour les développeursAzure Service Fabric pour les développeurs
Azure Service Fabric pour les développeurs
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Fonctions vocales sous Windows Phone : intégrez votre application à Cortana !

  • 1. Fonctions vocales sous Windows Phone : intégrez votre application à Cortana ! Caroline Constantin Microsoft - Senior Program Manager @caroc Jean-Sébastien Dupuy Microsoft – Developer Evangelist @dupuyjs
  • 2. tech.days 2015#mstechdays  Intégration Cortana  Reconnaissance vocale  Synthèse vocale
  • 5.
  • 6.
  • 7.
  • 9. <?xml version="1.0" encoding="utf-8"?> <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.1"> <CommandSet xml:lang="en-us" Name="englishCommands"> <CommandPrefix>MSDN</CommandPrefix> <Example>How do I add Voice Commands to my application</Example> <Command Name="FindText"> <Example>Find Install Voice Command Sets</Example> <ListenFor>Search</ListenFor> <ListenFor>Search for {dictatedSearchTerms}</ListenFor> <ListenFor>Find</ListenFor> <ListenFor>Find {dictatedSearchTerms}</ListenFor> <Feedback>Search on MSDN</Feedback> <Navigate Target="MainPage.xaml" /> </Command> <Command Name="nlpCommand"> <Example>How do I add Voice Commands to my application</Example> <ListenFor>{dictatedVoiceCommandText}</ListenFor> <Feedback>Starting MSDN...</Feedback> <Navigate Target="MainPage.xaml" /> </Command> <PhraseTopic Label="dictatedVoiceCommandText" Scenario="Dictation"> <Subject>MSDN</Subject> </PhraseTopic> <PhraseTopic Label="dictatedSearchTerms" Scenario="Search"> <Subject>MSDN</Subject> </PhraseTopic> </CommandSet> </VoiceCommands>
  • 10. <?xml version="1.0" encoding="utf-8"?> <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.0"> <CommandSet xml:lang="en-us" Name="englishCommands"> <CommandPrefix>MSDN</CommandPrefix> <Example>Find Voice Commands</Example> <Command Name="FindText"> <Example>Find Windows Phone</Example> <ListenFor>Search</ListenFor> <ListenFor>Search {*}</ListenFor> <ListenFor>Search for {listSearchTerms}</ListenFor> <ListenFor>Find</ListenFor> <ListenFor>Find {*}</ListenFor> <ListenFor>Find {listSearchTerms}</ListenFor> <Feedback>Search on MSDN</Feedback> <Navigate Target="MainPage.xaml" /> </Command> <PhraseList Label="listSearchTerms" Disambiguate="false"> <Item>Voice Commands</Item> <Item>Windows Phone</Item> </PhraseList> </CommandSet> </VoiceCommands> <?xml version="1.0" encoding="utf-8"?> <VoiceCommands xmlns="http://schemas.microsoft.com/voicecommands/1.0"> <CommandSet xml:lang="en-us" Name="englishCommands"> <CommandPrefix>MSDN</CommandPrefix> <Example>How do I add Voice Commands to my application</Example> <Command Name="FindText"> <Example>Find Install Voice Command Sets</Example> <ListenFor>Search</ListenFor> <ListenFor>Search for {dictatedSearchTerms}</ListenFor> <ListenFor>Find</ListenFor> <ListenFor>Find {dictatedSearchTerms}</ListenFor> <Feedback>Search on MSDN</Feedback> <Navigate Target="MainPage.xaml" /> </Command> <PhraseTopic Label="dictatedSearchTerms" Scenario="Search"> <Subject>MSDN</Subject> </PhraseTopic> </CommandSet> </VoiceCommands> Windows Phone 8.0 Windows Phone 8.1 Simple Scenarios, Limited Accuracy More Powerful, Easier, More Accurate
  • 11. private async void // SHOULD BE PERFORMED UNDER TRY/CATCH Uri new ms-appx:///vcd.xml UriKind.Absolute await Windows Phone Silverlight Apps on Windows Phone 8.1 Windows Runtime Apps on Windows Phone 8.1 private async void // SHOULD BE PERFORMED UNDER TRY/CATCH Uri uriVoiceCommands = new Uri("ms-appx:///vcd.xml", UriKind.Absolute); StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(uriVoiceCommands); await VoiceCommandManager.InstallCommandSetsFromStorageFileAsync(file);
  • 13. // Windows Phone Silverlight App, in MainPage.xaml.cs protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode == System.Windows.Navigation.NavigationMode.New) { string recoText = null; // What did the user say? e.g. MSDN, "Find Windows Phone Voice Commands" NavigationContext.QueryString.TryGetValue("reco", out recoText); string voiceCommandName = null; // Which command was recognized in the VCD.XML file? e.g. "FindText" NavigationContext.QueryString.TryGetValue("voiceCommandName", out voiceCommandName); string searchTerms = null; // What did the user say, for named phrase topic or list "slots"? e.g. "Windows Phone Voice Commands" NavigationContext.QueryString.TryGetValue("dictatedSearchTerms", out searchTerms); switch (voiceCommandName) // What command launched the app? { case "FindText": HandleFindText(searchTerms); break; case "nlpCommand": HandleNlpCommand(recoText); break; } } }
  • 15. // Windows Runtime App on Windows Phone 8.1, inside OnActivated override in App class if (args.Kind == ActivationKind.VoiceCommand) { VoiceCommandActivatedEventArgs vcArgs = (VoiceCommandActivatedEventArgs)args; string voiceCommandName = vcArgs.Result.RulePath.First(); // What command launched the app? switch (voiceCommandName) // Navigate to right page for the voice command { case "FindText": // User said "find" or "search" rootFrame.Navigate(typeof(MSDN.FindText), vcArgs.Result); break; case "nlpCommand": // User said something else rootFrame.Navigate(typeof(MSDN.NlpCommand), vcArgs.Result); break; } }
  • 17. tech.days 2015#mstechdays  Collaboration entre Bing, Google, Yahoo! et Yandex  Effort commun pour structurer les données (et faire l’objet de traitement automatisés)  Disponible aux formats microdata, JSON-LD et RDFa  Exemples: Events, Reviews, Recipes, Package Tracking
  • 18. // Windows Phone Store App // Synthesis <!--MediaElement in xaml file--> <MediaElement Name="audioPlayer" AutoPlay="True" .../> // C# code behind // Function to speak a text string private async void SpeakText(MediaElement audioPlayer, string textToSpeak) { SpeechSynthesizer synthesizer = new SpeechSynthesizer(); SpeechSynthesisStream ttsStream = await synthesizer.SynthesizeTextToStreamAsync(textToSpeak); audioPlayer.SetSource(ttsStream, ""); // This starts the player because AutoPlay="True" }
  • 19. // Windows Phone Store App // Recognition private async Task<SpeechRecognitionResult> RecognizeSpeech() { SpeechRecognizer recognizer = new SpeechRecognizer(); // One of three Constraint types available SpeechRecognitionTopicConstraint topicConstraint = new SpeechRecognitionTopicConstraint(SpeechRecognitionScenario.WebSearch, "MSDN"); recognizer.Constraints.Add(topicConstraint); await recognizer.CompileConstraintsAsync(); // Required // Put up UI and recognize user's utterance SpeechRecognitionResult result = await recognizer.RecognizeWithUIAsync(); return result; } // Calling code uses result.RecognitionResult.Text or // result.RecognitionResult.SemanticInterpretation
  • 21. © 2015 Microsoft Corporation. All rights reserved. tech days• 2015 #mstechdays techdays.microsoft.fr