コード例 #1
0
        public void TestVariants()
        {
            SpeechService SpeechService = new SpeechService();

            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049309), "Welcome to your Vulture.  Weapons online.");
            SpeechService.Transmit(null, ShipDefinitions.ShipFromEliteID(128049309), "Vulture x-ray whiskey tango seven one seven six requesting docking.");
            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049339), "Welcome to your Python.  Scanning at full range.");
            SpeechService.Transmit(null, ShipDefinitions.ShipFromEliteID(128049339), "Python victor oscar Pappa fife tree fawer niner requesting docking.");
            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049363), "Welcome to your Anaconda.  All systems operational.");
            SpeechService.Transmit(null, ShipDefinitions.ShipFromEliteID(128049363), "Anaconda charlie november delta one niner eight fawer requesting docking.");
        }
コード例 #2
0
        private void testShipName(object sender, RoutedEventArgs e)
        {
            Ship ship = (Ship)((Button)e.Source).DataContext;

            ship.Health = 100;
            SpeechServiceConfiguration speechConfiguration = SpeechServiceConfiguration.FromFile();
            SpeechService speechService = new SpeechService(speechConfiguration);

            if (String.IsNullOrEmpty(ship.PhoneticName))
            {
                speechService.Say(null, ship, ship.Name + " stands ready.");
            }
            else
            {
                speechService.Say(null, ship, "<phoneme alphabet=\"ipa\" ph=\"" + ship.PhoneticName + "\">" + ship.Name + "</phoneme>" + " stands ready.");
            }
        }
コード例 #3
0
        public void testSendAndReceive()
        {
            SpeechService SpeechService = new SpeechService();

            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049339), "Issuing docking request.  Please stand by.");
            SpeechService.Transmit(null, ShipDefinitions.ShipFromEliteID(128049339), "Anaconda golf foxtrot lima one niner six eight requesting docking.");
            SpeechService.Receive(null, ShipDefinitions.ShipFromEliteID(128049339), "Roger golf foxtrot lima one niner six eight docking request received");
        }
コード例 #4
0
        private void ttsTestDamagedVoiceButtonClicked(object sender, RoutedEventArgs e)
        {
            Ship testShip = ShipDefinitions.ShipFromModel((string)ttsTestShipDropDown.SelectedValue);

            testShip.Health = 20;
            SpeechServiceConfiguration speechConfiguration = SpeechServiceConfiguration.FromFile();
            SpeechService speechService = new SpeechService(speechConfiguration);

            speechService.Say(null, testShip, "Severe damage to your " + Translations.ShipModel((string)ttsTestShipDropDown.SelectedValue) + ".");
        }
コード例 #5
0
        public void TestPowerplay()
        {
            SpeechService SpeechService = new SpeechService();

            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Aisling Duval") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Archon Delaine") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Arissa Lavigny-Duval") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Denton Patreus") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Edmund Mahon") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Felicia Winters") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Pranav Antal") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Zachary Hudson") + ".");
            //SpeechService.Say(ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Zemina Torval") + ".");
            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049363), Translations.Power("Li Yong-Rui") + ".");
        }
コード例 #6
0
        public void TestDamage()
        {
            SpeechService SpeechService = new SpeechService();
            Ship          ship          = ShipDefinitions.ShipFromEliteID(128049363);

            ship.Health = 100;
            SpeechService.Say(null, ship, "Systems fully operational.");
            ship.Health = 80;
            SpeechService.Say(null, ship, "Systems at 80%.");
            ship.Health = 60;
            SpeechService.Say(null, ship, "Systems at 60%.");
            ship.Health = 40;
            SpeechService.Say(null, ship, "Systems at 40%.");
            ship.Health = 20;
            SpeechService.Say(null, ship, "Systems at 20%.");
            ship.Health = 0;
            SpeechService.Say(null, ship, "Systems critical.");
        }
コード例 #7
0
        public void TestSsml()
        {
            SpeechService SpeechService = new SpeechService();

            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049363), "You are travelling to the " + Translations.StarSystem("Hotas") + " system.");
        }
コード例 #8
0
        public void TestCallsign()
        {
            SpeechService SpeechService = new SpeechService();

            SpeechService.Say(null, ShipDefinitions.ShipFromEliteID(128049309), Translations.CallSign("GAB-1655"));
        }