Ejemplo n.º 1
0
        public void OnInit(OperationResult status)
        {
            if (status.Equals(OperationResult.Success))
            {
                speaker.SetLanguage(Locale.ForLanguageTag("sv-SE"));
                if ((int)speaker.IsLanguageAvailable(Locale.ForLanguageTag(language)) > 0)
                {
                    speaker.SetLanguage(Locale.ForLanguageTag(language));
                }

                speaker.Speak(toSpeak, QueueMode.Flush, null, null);
            }
        }
Ejemplo n.º 2
0
        public DatePickerDialog CreateDatePickerDialog(DatePickerDialog.IOnDateSetListener listener)
        {
            var locale   = Locale.ForLanguageTag("pl_PL");
            var calendar = Android.Icu.Util.Calendar.GetInstance(locale);
            var year     = calendar.Get(Android.Icu.Util.CalendarField.Year);
            var month    = calendar.Get(Android.Icu.Util.CalendarField.Month);
            var day      = calendar.Get(Android.Icu.Util.CalendarField.DayOfMonth);

            var dialog = new DatePickerDialog(
                Activity,
                Android.Resource.Style.ThemeHoloDialog,
                listener,
                year,
                month,
                day);

            return(dialog);
        }
        public void Speak(string text)
        {
            var ctx = Forms.Context;

            toSpeak = text;
            if (speaker == null)
            {
                speaker = new TextToSpeech(ctx, this);
            }
            else
            {
                var p = new Dictionary <string, string> ();
                speaker.SetLanguage(Locale.ForLanguageTag("it"));
                //speaker.SetVoice(Voice.
                speaker.Speak(toSpeak, QueueMode.Flush, p);
            }

            var voices = speaker.Voices;
//speaker.SetVoice (new Voice (voices.FirstOrDefault().Name, Locale.French, VoiceQuality.High, VoiceLatency.Normal, false, nu);
        }
        public Dictionaries(string language, string demonymWords, string animateWords, string inanimateWords, string maleWords, string neutralWords, string femaleWords, string pluralWords, string singularWords, string statesWords, string genderNumber
                            , string countries, string states, bool loadCorefDict, string[] corefDictFiles, string corefDictPMIFile, string signaturesFile)
        {
            Locale lang = Locale.ForLanguageTag(language);

            ReadWordLists(lang);
            LoadDemonymLists(demonymWords);
            LoadStateAbbreviation(statesWords);
            LoadAnimacyLists(animateWords, inanimateWords);
            LoadGenderLists(maleWords, neutralWords, femaleWords);
            LoadNumberLists(pluralWords, singularWords);
            LoadGenderNumber(genderNumber, neutralWords);
            LoadCountriesLists(countries);
            LoadStatesLists(states);
            SetPronouns();
            if (loadCorefDict)
            {
                LoadCorefDict(corefDictFiles, corefDict);
                LoadCorefDictPMI(corefDictPMIFile, corefDictPMI);
                LoadSignatures(signaturesFile, NE_signatures);
            }
        }
Ejemplo n.º 5
0
 public virtual void Init(Properties props)
 {
     lang = Locale.ForLanguageTag(props.GetProperty(Constants.LanguageProp, "en"));
 }