private void SaveWords() { Console.WriteLine("Calling SaveWords()..."); CustomWordTranslation ibm = new CustomWordTranslation() { Word = "IBM", Translation = "eye bee M" }; CustomWordTranslation iPhone = new CustomWordTranslation() { Word = "iPhone", Translation = "i Phone" }; CustomWordTranslation jpl = new CustomWordTranslation() { Word = "jpl", Translation = "J P L" }; _textToSpeech.SaveWords(_customVoiceModelID, ibm, iPhone, jpl); Console.WriteLine("Words saved."); }
public void DeleteWord(string modelID, CustomWordTranslation translation) { try { TextToSpeechRepository.DeleteWord(modelID, translation); } catch (Exception ex) { Logger.Error("TextToSpeechService.DeleteWord failed", this, ex); } }
public void DeleteWord(string modelID, CustomWordTranslation translation) { if (string.IsNullOrEmpty(modelID)) { throw new ArgumentNullException("Model id must not be empty"); } if (string.IsNullOrEmpty(translation.Word)) { throw new ArgumentNullException("Word must not be empty"); } DeleteWord(modelID, translation.Word); }