示例#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 };
 }