Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access Forbidden
#1
Hello Python community,

We have been using the leading programming language for artificial intelligence, data science and entrepreneurship.

Unfortunately, some modules within the language have been updated with a forbidden error among such as for speech reorganization and file reading.

An explanation will be a great service to the community of open minded people of the computer world. We await your answer and hope to see you soon.
Reply
#2
Please post a concrete example of runnable code throwing one of these errors. Your description of the issue is way too vague.
Reply
#3
Thank you for the reply, don't worry, we have the code.

import math as mt
import numpy as np
import os
import random as rd
import winsound as ws
import pyaudio as pa
import speech_recognition as sr

### This has to be 3.6.5 (32-bit for pyaudio)
for index, name in enumerate(sr.Microphone.list_microphone_names()):
    print("Microphone with name \"{1}\" found for `Microphone(device_index={0})`".format(index, name))


# get audio from the microphone                                                                       
r = sr.Recognizer()
with sr.Microphone() as source:                                                                       
    print("Speak:")                                                                                   
    audio = r.listen(source)

r.recognize_google(audio, key="GOOGLE_SPEECH_RECOGNITION_API_KEY")

try:
    print("You said " + r.recognize_google(audio))
except sr.UnknownValueError:
    print("Could not understand audio")
except sr.RequestError as e:
    print("Could not request results; {0}".format(e))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  IBM Watson: Handshake status 403 Forbidden or No section: 'auth' groschat 1 2,806 May-07-2021, 03:44 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020