1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package hikvoice
 
/*
#cgo CFLAGS: -I${SRCDIR}/include -w -g
#cgo LDFLAGS: -L${SRCDIR}/libs
#cgo LDFLAGS: -lHikVoice -lAudioRender -lHCCore -lhcnetsdk -lhpr
#cgo LDFLAGS: -ldl -lm
 
#include <stdlib.h>
#include "Voice.h"
 
*/
import "C"
 
// SendVoice Send Voice
func SendVoice(ip,usrname,passwd,voiceFilePath string) int {
    return int(C.SendVoice(C.CString(ip), C.CString(usrname), C.CString(passwd), C.CString(voiceFilePath)))
}