예제 #1
0
 public static VoiceDocument FromText(string voiceDocumentName, string voiceDocumentText, VoiceDocumentType type)
 {
     var bytes = Encoding.UTF8.GetBytes(voiceDocumentText);
     return new VoiceDocument(voiceDocumentName, bytes) { DocumentType = type };
 }
예제 #2
0
 public static VoiceDocument FromID(int listID, VoiceDocumentType type)
 {
     return new VoiceDocument(listID) { DocumentType = type };
 }
예제 #3
0
 public static VoiceDocument FromFile(string filePath, VoiceDocumentType type)
 {
     return new VoiceDocument(filePath) {DocumentType = type};
 }
예제 #4
0
 public static VoiceDocument FromByteArray(string voiceDocumentName, byte[] voiceDocumentData, VoiceDocumentType type)
 {
     return new VoiceDocument(voiceDocumentName, voiceDocumentData) { DocumentType = type };
 }
예제 #5
0
 public static VoiceDocument FromBinary(string filePath, byte[] fileBinary, VoiceDocumentType type)
 {
     return new VoiceDocument(filePath, fileBinary) {DocumentType = type};
 }
예제 #6
0
 public static VoiceDocument FromBase64String(string voiceDocumentName, string encodedVoiceDocumentData, VoiceDocumentType type)
 {
     var bytes = Convert.FromBase64String(encodedVoiceDocumentData);
     return new VoiceDocument(voiceDocumentName, bytes) { DocumentType = type };
 }