I turned the Python example code while trying Google Cloud Speech API, but there is an error!!!!!(Crying)

Asked 1 years ago, Updated 1 years ago, 95 views

Hello, everyone

The final goal is to apply real-time STT to Chrome extension programs using voice recognition APIs.

I kept looking for the voice recognition API, but it was judged that I could not access the microphone unless it was https, so I ended up using Google Cloud API.

I've seen and tried real-time voice recognition examples using the Google Cloud Speech API... There was an error, so I'm asking for your helpI tried it on Mac)

It went well until you signed up for Google Cloud and got an API key to get a simple sample example code (text-checking how old the request.json Brooklyn Bridge is).

And For real-time voice recognition, install the following and

brew install portaudio pip install pyaudio

Spin Python example code...

$ pip install google-cloud-speech

Installation continues and an exception appears <

Exception:

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main

status = self.run(options, args)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run

prefix=options.prefix_path,

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_set.py", line 784, in install

**kwargs

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_install.py", line 851, in install

self.move_wheel_files(self.source_dir, root=root, prefix=prefix)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files

isolated=self.isolated,

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/wheel.py", line 345, in move_wheel_files

clobber(source, lib_dir, True)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/wheel.py", line 316, in clobber

ensure_dir(destdir)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/utils/init.py", line 83, in ensure_dir

os.makedirs(path)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/os.py", line 241, in makedirs

mkdir(name, mode)

PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/api'

$ python transcribe_streaming_mic.py

An import error occurred.ㅠ<

Traceback (most recent call last):

File "transcribe_streaming_mic.py", line 8, in

from google.cloud import speech

ImportError: No module named google.cloud

stt google api python

2022-09-22 13:33

1 Answers

PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/api'

I heard that permission access to the file is not possible, so please check it out


2022-09-22 13:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.