Enable the customized voice of the specified number. Note: This function is a customized
function. To use this function, the device must support voice customization.
Customized voice: The device plays corresponding voice tones when performing some
operations. With this function, the device can be used to play customized voice. For
example, after verification succeeds, the device plays voice 1, that is, "Thank you". After this
function is used, the device can play customized after verification succeeds, for example:
EnableCustomizeVoice (1, 1, 1)//Enable customization function of voice 1
SetCustomizeVoice (1, 1, ‘C:\test.wav’)//Set customized voice of voice 1
Device number
Original voice number
Whether to enable customized voice of the specified number. 1: enable, 0: disable
Return True if it is successful, or return False.
SetCustomizeVoice, DelCustomizeVoice
/// <summary> /// Enable the customized voice of the specified number. Note: This function is a customized function.To use this function, /// the device must support voice customization. Customized voice: The device plays corresponding voice tones when performing /// some operations. With this function, the device can be used to play customized voice. For example, afterverification /// succeeds,the deviceplays voice 1, thatis, "Thankyou".Afterthis function is used, the device can play customized after /// verification succeeds, for example: EnableCustomizeVoice (1, 1, 1)//Enable customization function of voice 1 /// SetCustomizeVoice (1, 1, ‘C:\test.wav’)//Set customized voice of voice 1 /// </summary> /// <param name="VoiceID ">Original voice number</param> /// <param name="Enablel">Whether to enable customized voice of the specified number. 1: enable, 0: disable </param> /// <param name="IP"> Ip of device </param> /// <param name="Port"> Port of Device </param> /// <param name="MachineNumber"> Device Number </param> private void EnableCustomizeVoice(int VoiceID, int Enablel, string IP = "10.0.0.44", int Port = 4370, int MachineNumber = 1) { //Create Standalone SDK class dynamicly. zkemkeeper.CZKEMClass axCZKEM1 = new zkemkeeper.CZKEMClass(); axCZKEM1.Connect_Net(IP, Port); int idwErrorCode = 0; if (axCZKEM1.EnableCustomizeVoice(MachineNumber, VoiceID, Enablel)) { MessageBox.Show("EnableCustomizeVoice! ", "Success"); } else { axCZKEM1.GetLastError(ref idwErrorCode); MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error"); } }
''' <summary> ''' Enable the customized voice of the specified number. Note: This function is a customized function.To use this function, ''' the device must support voice customization. Customized voice: The device plays corresponding voice tones when performing ''' some operations. With this function, the device can be used to play customized voice. For example, afterverification ''' succeeds,the deviceplays voice 1, thatis, "Thankyou".Afterthis function is used, the device can play customized after ''' verification succeeds, for example: EnableCustomizeVoice (1, 1, 1)//Enable customization function of voice 1 ''' SetCustomizeVoice (1, 1, ‘C:\test.wav’)//Set customized voice of voice 1 ''' </summary> ''' <param name="VoiceID ">Original voice number</param> ''' <param name="Enablel">Whether to enable customized voice of the specified number. 1: enable, 0: disable </param> ''' <param name="IP"> Ip of device </param> ''' <param name="Port"> Port of Device </param> ''' <param name="MachineNumber"> Device Number </param> Private Sub EnableCustomizeVoice(ByVal VoiceID As Integer, ByVal Enablel As Integer, Optional IP As String = "10.0.0.44", Optional Port As Integer = 4370, Optional MachineNumber As Integer = 1) 'Create Standalone SDK class dynamicly. Dim axCZKEM1 As zkemkeeper.CZKEMClass = New zkemkeeper.CZKEMClass() axCZKEM1.Connect_Net(IP, Port) Dim idwErrorCode As Integer = 0 If axCZKEM1.EnableCustomizeVoice(MachineNumber, VoiceID, Enablel) Then MessageBox.Show("EnableCustomizeVoice! ", "Success") Else axCZKEM1.GetLastError(idwErrorCode) MessageBox.Show("Operation failed,ErrorCode=" + idwErrorCode.ToString(), "Error") End If End Sub