Exemple #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            _audioTmp = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/audioTmp.3gpp";

            var btnSpeak = FindViewById <Button>(Resource.Id.btnSpeak);

            btnSpeak.Click += OnSpeakClick;

            _btnRecord        = FindViewById <Button>(Resource.Id.btnRecord);
            _btnRecord.Touch += OnRecordTouch;

            _btnPlay         = FindViewById <Button>(Resource.Id.btnPlay);
            _btnPlay.Enabled = false;
            _btnPlay.Click  += OnPlayClick;

            _editText = FindViewById <EditText>(Resource.Id.wordTextInput);
            var ttsInit = new TTSInit();

            _tts        = new TextToSpeech(this, ttsInit);
            ttsInit.TTS = _tts;
        }
Exemple #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            _audioTmp = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "/audioTmp.3gpp";

            var btnSpeak = FindViewById<Button>(Resource.Id.btnSpeak);
            btnSpeak.Click += OnSpeakClick;

            _btnRecord = FindViewById<Button>(Resource.Id.btnRecord);
            _btnRecord.Touch += OnRecordTouch;

            _btnPlay = FindViewById<Button>(Resource.Id.btnPlay);
            _btnPlay.Enabled = false;
            _btnPlay.Click += OnPlayClick;

            _editText = FindViewById<EditText>(Resource.Id.wordTextInput);
            var ttsInit = new TTSInit();
            _tts = new TextToSpeech(this, ttsInit);
            ttsInit.TTS = _tts;
        }