140 likes | 371 Views
Windows 8.1 Äpipäev. Ondrej Stastny Microsoft Premier Field Engineer. Agenda. Speech Synthesis AR Parrot Drone UI 3D printing. Speech Synthesis. Speech Synthesis Markup Language (SSML). XML based language W3 standard for speech synthesis. Mark
E N D
Windows 8.1 Äpipäev • Ondrej Stastny • Microsoft Premier Field Engineer
Agenda • Speech Synthesis • AR Parrot Drone UI • 3D printing
Speech Synthesis Markup Language (SSML) • XML based language • W3 standard for speech synthesis
Mark • Notify app that certain point has been reached • Phoneme • Phonetic pronounciation • Say-as • Aid the synthesis processor • P, Break, …
// createthe data stream SpeechSynthesisStreamsynthesisStream; synthesisStream= awaitthis.synthesizer.SynthesizeSsmlToStreamAsync(text); // start this audio stream playing this.media.AutoPlay= true; this.media.SetSource(synthesisStream,synthesisStream.ContentType); this.media.Play();
Initialize connection to the drone publicstaticasyncTaskConnectToDrone() { // Set up the UDP connection stringremotePort = "5556"; HostNamedroneIP = newHostName("192.168.1.1"); udpSocket = newDatagramSocket(); awaitudpSocket.BindServiceNameAsync(remotePort); awaitudpSocket.ConnectAsync(droneIP, remotePort); udpWriter = newDataWriter(udpSocket.OutputStream); }
Send a command publicstaticasyncTaskSendDroneCommand(stringcommand) { udpWriter.WriteString(command); awaitudpWriter.StoreAsync(); } AT*REF – takeoff/landing,reset AT*PCMD -airborn manipulation [sequence, flag, roll, pitch, vertical speed, angular speed]
// Strafedrone forward orbackwardatvelocity in range [-1,1] publicstaticstringGetDroneStrafeForwardBackward(uintsequenceNumber, doublevelocity) { // Convertthe ratio into a valuethedroneunderstands intvalue = FloatConversion(velocity); returnCreateATPCMDCommand(sequenceNumber, "0,"+ value + ",0,0"); } // Return a full ATPCMD command privatestaticstringCreateATPCMDCommand(uintsequenceNumber, stringcommand) { return"AT*PCMD="+ sequenceNumber + ",1,"+ command + Environment.NewLine; }
Intro • 3D printing will go mainstream • Similar to printing 2D content • Print Preview • Print Ticket XML
1. Register for Print contract protectedvirtualvoidRegisterForPrinting() { // CreatethePrintDocument. printDocument = newPrintDocument(); // SavetheDocumentSource. printDocumentSource = printDocument.DocumentSource; // Addaneventhandlerwhichcreatespreviewpages. printDocument.Paginate += CreatePrintPreviewPages; // Addaneventhandlerwhichprovides a specifiedpreviewpage. printDocument.GetPreviewPage += GetPrintPreviewPage; // Addaneventhandlerwhichprovidesallfinalprintpages. printDocument.AddPages += AddPrintPages; // Create a PrintManager and add a handlerforprintinginitialization. PrintManagerprintMan = PrintManager.GetForCurrentView(); printMan.PrintTaskRequested += PrintTaskRequested; // Initializeprintcontentforthisscenario PreparePrintContent(); }