반응형

안녕하세요, 츄르 사려고 코딩하는 집사 코집사입니다.


이번 2019년 1월 말부터 구글에서 모집했던 구글 스터디 잼에 참가하게 되었습니다.

구글 스터디 잼에서 많이 부족하지만 포피플이라는 그룹 이름으로 그룹장으로 활동을 하게 되었습니다.


2월 11일부터 2월 12일까지 퀵랩 쿠폰 등록이 끝났고, 이제 본격적인 스터디가 시작을 하게 되었는데, 수료 조건이 너무 간단해서 스터디가 될지는 모르겠네요.


그래도 퀵랩이 1달 무제한 이용이 가능하니, 머신러닝 부분은 따로 그룹원 16명과 시작해야 할 것 같습니다.



본격적으로, 첫번째 수료 조건 Google Cloud Speech API : Qwik Start를 시작하겠습니다.




#Overview


#What you'll do

  1) Create an API Key

  2) Create a Speech API request

  3) Call the Speech API request



#Setup and Requirements


Before you click the Start Lab button(시작하기 전에 아래 글을 보세요!)


원문

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Cloud resources will be made available to you.

This Qwiklabs hand-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access the Google Cloud Platform for the duration of the lab.

해석

이 설명서를 읽어보세요. Labs는 시간 제한이 있고 중지를 할 수 없습니다. Start Lab 버튼을 눌렀을 때 시작하는 타이머는 얼마나 Cloud resources를 이용할 수 있는지를 알려줍니다.


이 Qwiklabs 실습 lab을 사용하면 실제 Cloud 환경에서 직접 lab 활동을 할 수 있습니다. Lab 기간동안 Google Cloud Platform에 액세스를 할 수 있고 임시 자격 증명을 제공합니다.



#What you need

1) Access to a standard internet browser(크롬 권장)

2) Time to complete the lab.(시간 안에 해결)


#How to start your lab and sign in to the Console

1. Start Lab 버튼 누르기


2. Use Subscription 누르기

3. 위의 사진 왼쪽에 Connection Details 밑에 username과 password 입력


4. Accept 동의 해주기

5. Google Console을 누르고 START CLOUD SHELL 버튼 누르기

6. gcloud auth list 를 입력하면 계정 이름을 알 수 있습니다.

7. gcloud config list project를 입력하면 프로젝트 이름을 알 수 있습니다.

8. API KEY를 만들어 줍니다. 

    왼쪽 APIs & Services에서 Credentials를 누르고, Create credentials에서 API Key를 눌러줍니다.

9. API Key를 환경 변수에 저장

10. 커맨드에 touch request.json 입력 후, vim request.json을 하여 아래의 코드를 넣어줍니다.

{ "config": { "encoding":"FLAC", "sample_rate": 16000, "language_code": "en-US" }, "audio": { "uri":"gs://cloud-samples-tests/speech/brooklyn.flac" } }

11. Call the Speech API 

커맨드에 아래의 명령어 입력

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

12. 아래의 Output이 나오면 끝!

{ "results": [ { "alternatives": [ { "transcript": "how old is the Brooklyn Bridge", "confidence": 0.98267895 } ] } ] }

반응형
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기