private void Awake()
        {
            _source = GetComponent <AudioSource>();

            if (_source == null)
            {
                Debug.LogWarning("No AudioSource Component Provided!");
            }

            if (Microphone.devices.Length <= 0)
            {
                Debug.LogWarning("No Microphone Connected!");
                return;
            }

            Microphone.GetDeviceCaps(null, out _minimumFrequency, out _maximumFrequency);

            if (_minimumFrequency == 0 && _maximumFrequency == 0)
            {
                _maximumFrequency = 44100;
            }

            CoreServices.InputSystem?.RegisterHandler <IMixedRealityInputHandler>(this);
            indicator.gameObject.SetActive(false);

            _service = new DialogFlowService();
            _isMicrophoneConnected = true;
        }
Exemple #2
0
        static void Main(string[] args)
        {
            dialogFlowService = new DialogFlowService();
            botClient         = new TelegramBotClient("849665114:AAFHUShqVuYtW79Cf7knwbJnbF-B5OUHCow");
            var me = botClient.GetMeAsync().Result;

            Console.WriteLine(
                $"Hello, World! I am user {me.Id} and my name is {me.FirstName}."
                );
            botClient.OnMessage += Bot_OnMessage;
            botClient.StartReceiving();
            Console.ReadKey();
        }
Exemple #3
0
        public RoutDialog(ITelegramBotClient botClient)
        {
            var blaBlaCarConfig = new BlaBlaCarConfig
            {
                ApiUrl =
                    "https://public-api.blablacar.com/api/v2/trips?locale=uk_UA&cur=UAH&fn={from}&tn={to}&db={date}",
                ApiKey = "9bd3dc5d46c34a0cb1ac951322208f77"
            };
            var busConfig = new BusConfig
            {
                ApiUrl =
                    "http://ticket.bus.com.ua/order/forming_bn?point_from={from}&point_to={to}&date={date}&date_add=0&fn=round_search",
                BookingUrl =
                    "http://ticket.bus.com.ua/order/forming_bn?round_num={round_num}&count=1&email={email}&reservation=&bs_code={bus_code}&point_from={from_code}&point_to={to_code}&local_point_from={local_from_code}&local_point_to={local_to_code}&date={date}&date_add=0&date_dep={date}&fn=check_places&ya=0&submit=%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0+%D0%BC%D0%B5%D1%81%D1%82+%D0%B8+%D1%81%D1%82%D0%BE%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8",
                SiteUrl = "http://ticket.bus.com.ua/"
            };

            blaBlaCarFinder = new BlaBlaCarFinder(new HttpService(), new DateFormatter(), Options.Create(blaBlaCarConfig));
            busFinder       = new BusFinder(new HttpService(), new DateFormatter(), Options.Create(busConfig),
                                            new LinkBuilder(new DateFormatter(), Options.Create(busConfig)));
            dialogFlowService = new DialogFlowService();
            this.botClient    = botClient;
        }
Exemple #4
0
        static void Main(string[] args)
        {
            var service = new DialogFlowService();

            var resp = service.Ask("What is Harry Potter rate");
        }