Пример #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 };
 }