You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Azure Speech SDK for golang and this is my DockerFile but I am getting error above.
I dont know if the install guide is up-to-date
I saw it doesn't work for Debian 12, can it be the reason?
The uname-sp gives me this architecture and platform values: Linux x86_64 and
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /tmp/go-link-204386385/000001.o: in function `_cgo_c009bcede03b_Cfunc_audio_config_create_audio_input_from_a_microphone':
audio_config.cgo2.c:(.text+0x69): undefined reference to `audio_config_create_audio_input_from_a_microphone'
/usr/bin/ld: /tmp/go-link-204386385/000001.o: in function `_cgo_c009bcede03b_Cfunc_audio_config_create_audio_input_from_default_microphone':
audio_config.cgo2.c:(.text+0xb5): undefined reference to `audio_config_create_audio_input_from_default_microphone'
/usr/bin/ld: /tmp/go-link-204386385/000001.o: in function `_cgo_c009bcede03b_Cfunc_audio_config_create_audio_input_from_stream':
audio_config.cgo2.c:(.text+0x10c): undefined reference to `audio_config_create_audio_input_from_stream'
/usr/bin/ld: /tmp/go-link-204386385/000001.o: in function `_cgo_c009bcede03b_Cfunc_audio_config_create_audio_input_from_wav_file_name':
audio_config.cgo2.c:(.text+0x163): undefined reference to `audio_config_create_audio_input_from_wav_file_name'
# Use the official Go image as the base image
FROM golang:1.19
RUN apt-get update
RUN apt-get install -y build-essential libssl-dev ca-certificates libasound2 wget
RUN echo $(arch) : $(uname -m)
ENV HOME /root
ENV SPEECHSDK_ROOT="$HOME/speechsdk"
RUN mkdir -p "$SPEECHSDK_ROOT"
# Download and extract Speech SDK
RUN wget -O SpeechSDK-Linux.tar.gz https://aka.ms/csspeech/linuxbinary \
&& tar --strip 1 -xzf SpeechSDK-Linux.tar.gz -C "$SPEECHSDK_ROOT" \
&& rm SpeechSDK-Linux.tar.gz
RUN echo $(ls -l "$SPEECHSDK_ROOT/lib")
ENV CGO_CFLAGS="-I$SPEECHSDK_ROOT/include/c_api"
ENV CGO_LDFLAGS="-L$SPEECHSDK_ROOT/lib/x64-lMicrosoft.CognitiveServices.Speech.core"
ENV LD_LIBRARY_PATH="$SPEECHSDK_ROOT/lib/x64:$LD_LIBRARY_PATH"
RUN echo $(go env)
# Set the working directory inside the container
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
# Build the Go application
RUN go build -o /main
# Run the Go application
CMD ["/main"]
The text was updated successfully, but these errors were encountered:
I am trying to use Azure Speech SDK for golang and this is my DockerFile but I am getting error above.
I dont know if the install guide is up-to-date
I saw it doesn't work for Debian 12, can it be the reason?
The uname-sp gives me this architecture and platform values:
Linux x86_64
andThe text was updated successfully, but these errors were encountered: