Using the Google Cloud Speech API

목록
- Speech-to-Text API: Qwik Start
- Speaking with a Webpage - Streaming Speech Transcripts
- Speech to Text Transcription with the Speech-to-Text API ⬅️ 오늘의 Lab!
- Using the Google Cloud Speech API: Challenge Lab
스크립트 작성을 위해 오디오 파일을 Speech API로 전송하기





touch request.json
nano request.json
# 내용
{
"config": {
"encoding":"FLAC",
"languageCode": "en-US"
},
"audio": {
"uri":"gs://cloud-samples-data/speech/brooklyn_bridge.flac"
}
}

curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \
"https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}" > result.json

# request.json 파일 내용 수정
{
"config": {
"encoding":"FLAC",
"languageCode": "fr"
},
"audio": {
"uri":"gs://cloud-samples-data/speech/corbeau_renard.flac"
}
}

curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json \
"https://speech.googleapis.com/v1/speech:recognize?key=${API_KEY}" > result.json