Google assistant library on ubuntu #1 사전 조사

in #busy5 years ago (edited)

저는 취미활동으로 저만의 로봇을 만들고 있습니다. 중간중간 쉬고 있긴 하지만 꾸준히 하는중이긴 합니다.

최근에 계속 로봇에 어떻게하면 쉽게 음성인식 기능을 적용할 수 있을까? 에 대해 고민중입니다.

이 포스팅은 구글 어시스턴트를 어떻게 로봇에 적용할까? 에 관련된 포스팅입니다.

구글 어시스턴트 서비스, 라이브러리를 활용해서 제가 할 것은 아래와 같습니다.

  • 음성인식 결과 (사용자가 말한 것) 가져오기
  • Google assistant의 응답 가져오기
  • 특정 명령에 대해서는 내가 설정한 대답, 혹은 동작을 할 수 있도록 한다. (내방 불꺼줘, Jacob이 누구지? – 제이콥은 저를 만든 사람입니다.)
    • 즉, 구글 어시스턴트의 대답과 내가 설정한 것을 선택할 수 있어야함.
  • 시리야, Ok google 과 같은 Custom Invocation (hot word, wake word)이 필요

이 4가지를 로봇에 적용하려고 합니다.

어느정도 진행을 했는데 아직 정리를 못했습니다.

하나하나 정리를 해보려고 합니다.

감사합니다.

이번 글은 먼저 튜토리얼을 따라서 해보고, 여러가지 검색했던 결과들에 대한 나열입니다.

 

google assistant에 대한 이미지 검색결과

<출처 : https://assistant.google.com/#?modal_active=none>


Google assistant library 튜토리얼

google에서 제공하는 내용이다.

https://developers.google.com/assistant/sdk/guides/library/python/

이대로 따라해보도록 한다.

 

마이크 체크

  • arecord –l
    • 마이크 목록 확인
    • 0 카드, 0  장치 (card 0, device 0)

  • arecord –format=S16_LE –duration=5 –rate=16000 –file-type=raw out.raw
    • 옵션
      • -D hw: card,device
      • -D hw:1,0 (CameraB409241의 마이크 선택)

 

마이크 추천

https://community.home-assistant.io/t/best-microphone-for-diy-voice-control-components/51265

스피커 체크

  • speaker-test -t wav

프로젝트 관리

프로젝트 관리

https://console.actions.google.com/u/1/project/

보안 관련, key

https://console.developers.google.com/apis/

Google assistant 튜토리얼 결과물

튜토리얼대로 하면 샘플코드를 실행할 수 있다.

hotword ‘OK google’을 하고, 말을 하면 된다.

  • googlesamples-assistant-hotword –project-id proejctID –device-model-id modelID
    • projectID와 modelID는 아래 순서로 들어가서 가져온다.
    • projectID – 구글 액션 콘솔 -> 톱니 -> Project setting -> project ID
    • modelID – 구글 액션 콘솔 ->Device registration -> model ID

 

기타

Google assistatnt docker 활용 검토

Custom Device Actions

https://developers.google.com/assistant/sdk/device-actions-overview

파이썬 코드 샘플

https://github.com/googlesamples/assistant-sdk-python/tree/master/google-assistant-sdk/googlesamples/assistant/library

무조건 응답이 있는 것 같다.

특정 조건에서 내가 원하는 것을 할 수 있을까?

잘 모르겠다.

GRPC로 해봐야겠다.

Custom Wake

https://github.com/shivasiddharth/GassistPi

https://snowboy.kitt.ai/

 

참고 프로젝트

 

https://wiki.odroid.com/odroid-xu4/application_note/software/ai_speaker

Sort:  

jjm.jpeg
짱짱맨 호출에 응답하여 보팅하였습니다.

짱짱맨은 저자응원 프로그램입니다. 더 많은 저자 분들에게 더 큰 혜택을 드리고자 스파임대 스폰서를 받고 있습니다. 스폰서 참여방법과 짱짱맨 프로그램에 관해서는 이 글을 읽어 주세요. 기업형 예비증인 북이오(@bukio)가 짱짱맨 프로그램을 운영하고 있습니다. 여러분의 증인 보팅은 큰 힘이 됩니다. Vote for @bukio

Hi @jacobyu!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 2.433 which ranks you at #17429 across all Steem accounts.
Your rank has dropped 2 places in the last three days (old rank 17427).

In our last Algorithmic Curation Round, consisting of 270 contributions, your post is ranked at #147.

Evaluation of your UA score:
  • Only a few people are following you, try to convince more people with good work.
  • Your contribution has not gone unnoticed, keep up the good work!
  • Good user engagement!

Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.34
TRX 0.11
JST 0.034
BTC 66344.62
ETH 3214.81
USDT 1.00
SBD 4.37