본문 바로가기
연구/경환 - 서기

[200929] STT -> 형태소분석

by <감귤> 2020. 9. 29.
반응형

 

현재 상태

<in CMD>

//첫번째 에러

(env) C:\Users\kyung\stt_ass>python stt_test1.py

Traceback (most recent call last):

  File "stt_test1.py", line 32, in <module>

    from google.cloud import speech

ModuleNotFoundError: No module named 'google' 

이라는 에러를 제일 처음 만날 것이다.

해결 :

오류뜬 장소에서

 1) pip install --upgrade google-cloud-storage

 2) pip install google-cloud-speech

 3) gcloud auth activate-service-account --key-file="경로\파일명" (경로에 아까 다운받은 .json 파일이 있는 위치를 넣어준다. 파일명에는 다운받은 .json파일 이름을 써준다. 파일명에 .json 까지 넣어줘야 함.)

를 해주니 해결됨.

 

//두번째 에러

(env) C:\Users\kyung\stt_ass>python stt_test1.py

Traceback (most recent call last):

  File "stt_test1.py", line 33, in <module>

    from google.cloud.speech import enums

ImportError: cannot import name 'enums' from 'google.cloud.speech' (C:\Users\kyung\stt_ass\env\lib\site-packages\google\cloud\speech\__init__.py)

// types 랑 enums 위치 바꾸면 types가 에러라고 뜸

반응형