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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 

Recently uploaded (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 

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