Ejemplo n.º 1
0
        public RecordedView(string rFilePath, int time)
        {
            recordFilePath = rFilePath;

            InitializeComponent();

            this.buttonPlay.Clicked  += PlayRecorded;
            this.buttonStop.Clicked  += StopRecorded;
            this.buttonPause.Clicked += PauseRecorded;

            //this.buttonGetVoiceText.Clicked += getVoiceText;
            this.buttonGetVoiceText.Clicked += async(sender, e) =>
            {
                entryRecognizedText.Text = "loading the result";
                //Task<string> tresult = GetVoiceText_async(rFilePath);
                voiceRecog = DependencyService.Get <IVoiceRecognition>();
                voiceRecog.RecognizeVoice(rFilePath, entryRecognizedText);
                //string recogText = await tresult;
                //entryRecognizedText.Text = recogText;
            };

            //this.labelFileName.Text = rFilePath;
            this.labelRecordedTime.Text = time.ToMinSecondString();
            player = DependencyService.Get <IPlayer>();
        }