-1

#import library import speech_recognition as sr

ModuleNotFoundError Traceback (most recent call last)

in () 1 #import library ----> 2 import speech_recognition as sr 3 4 # Initialize recognizer class (for recognizing the speech) 5 r = sr.Recognizer()

ModuleNotFoundError: No module named 'speech_recognition'

Falcon
  • 1
  • 1
  • 1
    Have you tried following tutorials or searching yourself how to install package in Colab? Likely it will be the first result in your search. – Lukasz Tracewski Aug 07 '21 at 18:47

1 Answers1

0

Seems you do not have this speech_recognition installed in Google Colab, and you want to use it? If so, there are three ways that you can install it.

  1. You can simply start a new code cell, and type with: !pip install package_you_want.

  2. If you look at the left-bottom of your Colab interface, you will find an icon like this. The second one is the link to open the terminal. Then you can install package there, as what you do on the normal server.

enter image description here

  1. If you want to install/import the package you write locally. Then you can pack them into a py file, and upload it to the Colab. Then, you can simply call the name of your package and use it. import package_you_write.

enter image description here

Nick Nick Nick
  • 159
  • 3
  • 13