12
Voice APIs in Windows Phone 8 Josué Yeray Julián Ferreiro Development advisor @ Plain Concepts Nokia Developer Champion / Certified Trainer Microsoft MVP Windows Phone [email protected] @JosueYeray http://bit.ly/BlogYeray 1

RIATec Windows Phone 8 Voice APIs

Embed Size (px)

DESCRIPTION

Talk about windows phone 8 new voice APIs

Citation preview

Page 1: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Josué Yeray Julián FerreiroDevelopment advisor @ Plain ConceptsNokia Developer Champion / Certified TrainerMicrosoft MVP Windows Phone

[email protected]@JosueYeray

http://bit.ly/BlogYeray

1

Page 2: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Windows Phone 8 Incluye tres tipos de uso de voz

• Comandos de voz (VCD)

• Text To Speech (TTS)

• Speech To Text (STT)

Page 3: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Comandos de Voz

Nos permiten definir ordenes, que el sistema operativo entiende

Sirven para iniciar nuestra aplicación, realizando una acción concreta

Manejados por el sistema:Definimos un archivo VCD

Al inicio de la app, lo instalamos en el sistema

El sistema será capaz de ejecutar esas ordenes

Page 4: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Comandos de VozArchivo VCD (Voice Command Definition)Compuesto por CommandSets, cada uno con un idiomaCada CommandSet se compone de comandos

<CommandSet xml:lang="es" Name="NavigatorSpanishCommands"> <CommandPrefix>navegador</CommandPrefix> <Example> abrir navegador </Example>

<Command Name="SeachNavigator"> <Example> nueva ruta </Example> <ListenFor> [y] buscar [una] [nueva] ruta </ListenFor> <Feedback> buscando nueva ruta... </Feedback> <Navigate /> </Command></CommandSet>

Page 5: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Comandos de Voz

Clase VoiceCommandServiceNamespace Windows.Phone.Speech.VoiceCommandsIMPORTANTE: ID_CAP_SPEECH_RECOGNITION

Comprobamos si el comando ya está instalado con InstalledCommandSets

Instalamos con InstallCommandSetFromFileAsync

if (!VoiceCommandService.InstalledCommandSets.ContainsKey("NavigatorEnglishCommands")) await VoiceCommandService.InstallCommandSetsFromFileAsync( new Uri("ms-appx:///VoiceCommands.xml", UriKind.Absolute));

Page 6: RIATec Windows Phone 8 Voice APIs

DEMO TIME!Añadiendo commandos de voz a nuestro navegador GPS

6

Page 7: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Speech To Text

Nos permite reconocer texto a partir de la voz

Namespace Windows.Phone.Speech.Recognition

Clase SpeechRecognizerUI

IMPORTANTE: ID_CAP_SPEECH_RECOGNITION y ID_CAP_MICROPHONE

Page 8: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Speech To Text (Without UI)

Nos permite reconocer texto a partir de la voz

Namespace Windows.Phone.Speech.Recognition

Clase SpeechRecognizer

Evento AudioCaptureStateChanged

IMPORTANTE: ID_CAP_SPEECH_RECOGNITION y ID_CAP_MICROPHONE

Page 9: RIATec Windows Phone 8 Voice APIs

DEMO TIME!Añadiendo reconocimiento de voz a nuestro navegador

GPS

9

Page 10: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

Text To Speech

Nos permite sintetizar texto con las voces instaladas en el sistema.

Podemos escoger género e idioma de la voz.

Namespace Windows.Phone.Speech.Synthesis

Clase SpeechSynthesizer

SpeechTextAsync(“”);

Page 11: RIATec Windows Phone 8 Voice APIs

DEMO TIME!Añadiendo sintetización de voz a nuestro navegador GPS

11

Page 12: RIATec Windows Phone 8 Voice APIs

Voice APIs in Windows Phone 8

[email protected]@JosueYerayhttp://bit.ly/blogyeray

¡Gracias!¿Preguntas?