Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Last active November 14, 2025 14:54
Show Gist options
  • Select an option

  • Save KaushikShresth07/787be8b136fd90c84d2ab0c38fcede0b to your computer and use it in GitHub Desktop.

Select an option

Save KaushikShresth07/787be8b136fd90c84d2ab0c38fcede0b to your computer and use it in GitHub Desktop.
# pip install webdriver_manager
# pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
Link = r"C:\Users\mrmil\OneDrive\Desktop\Jarvis4YouTube\voice.html"
chrome_options = Options()
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.142.86 Safari/537.36"
chrome_options.add_argument(f'user-agent={user_agent}')
chrome_options.add_argument("--use-fake-ui-for-media-stream")
chrome_options.add_argument("--use-fake-device-for-media-stream")
chrome_options.add_argument("--headless=new")
service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(service=service, options=chrome_options)
driver.get(Link)
def SpeechRecognitionModel():
driver.find_element(by=By.ID,value="start").click()
print("Listening...")
while True:
try:
Text = driver.find_element(by=By.ID,value="output").text
if Text:
driver.find_element(by=By.ID,value="end").click()
return Text
else:
sleep(0.333)
except:
pass
@deveshyad

Copy link
Copy Markdown

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1

  • pip install webdriver_manager
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

anybody knows what it is

@sojanonelson

Copy link
Copy Markdown

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • pip install webdriver_manager
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

anybody knows what it is

Bro, actually the package named pip is required for installing modules. Download the get-pip.py file (you can use this link: ) and run the file using the command python get-pip.py and your restart pc
Hope that helps :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment