Golang based Azure TTS for MacOS

Linux와 다른 Speech SDK를 설치해야 한다.
MacOS Speech SDK 가져오기
$ export LIB_DIR="/your/path" $ mkdir -p $LIB_DIR $ wget -O MicrosoftCognitiveServicesSpeech.xcframework.zip https://aka.ms/csspeech/macosbinary $ unzip MicrosoftCognitiveServicesSpeech.xcframework.zip -d $LIB_DIR
Bash
복사
Go에서 사용하기 위해 환경 설정하기
export LIB_DIR="/your/path" export CGO_CFLAGS="-I${LIB_DIR}/MicrosoftCognitiveServicesSpeech.xcframework/macos-arm64_x86_64/MicrosoftCognitiveServicesSpeech.framework/Headers" export CGO_LDFLAGS="-Wl,-rpath,${LIB_DIR}/MicrosoftCognitiveServicesSpeech.xcframework/macos-arm64_x86_64 -F${LIB_DIR}/MicrosoftCognitiveServicesSpeech.xcframework/macos-arm64_x86_64 -framework MicrosoftCognitiveServicesSpeech" export LD_LIBRARY_PATH="${LIB_DIR}/MicrosoftCognitiveServicesSpeech.xcframework/macos-arm64_x86_64"
Shell
복사
Run
$ go run xxx.go
Bash
복사
참고,