private List <Word> UploadVoice(List <Word> list, int count) { VoiceAPI api = new VoiceAPI(); for (int i = list.Count - 1; i >= 0; i--) { if (list[i].Voice == null) { if (count == 0) { break; } byte[] voice = api.UploadVoice(list[i].Word1); list[i].Voice = voice; if (list[i].Voice.Length <= 1) { list.Remove(list[i]); } else { count--; } } } list.RemoveAll(x => x.Voice == null); return(list); }
private Word UploadVoice(Word word) { VoiceAPI api = new VoiceAPI(); byte[] voice = api.UploadVoice(word.Word1); word.Voice = voice; return(word); }
private byte[] UploadVoice(string sentence) { VoiceAPI api = new VoiceAPI(); byte[] result = api.UploadVoice(sentence); if (result.Length <= 1) { result = null; } return(result); }
public CallingModel() { //State = CallingState.FREE; Room = new RoomModel(); voiceAPI = VoiceAPI.GetInstance(); }