NetHyTech-STT-Labib 0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,54 @@
1
+ # pip install selenium
2
+
3
+ from selenium import webdriver
4
+ from selenium.webdriver.common.by import By
5
+ from selenium.webdriver.support.ui import WebDriverWait
6
+ from selenium.webdriver.support import expected_conditions as EC
7
+ from selenium.webdriver.chrome.service import Service
8
+ # pip install webdriver-manager
9
+ from webdriver_manager.chrome import ChromeDriverManager
10
+ from os import getcwd
11
+
12
+
13
+ # setting up chrome options with specific arguments
14
+ chrome_options = webdriver.ChromeOptions()
15
+ chrome_options.add_argument("--use-fake-ui-for-media-stream")
16
+ chrome_options.add_argument("--headless=new")
17
+
18
+ # setting up chrome driver with webDriverManager and options
19
+ driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
20
+
21
+ # Creating the URL for the website using the current working directory
22
+ website = "https://speechtotext123.netlify.app/"
23
+
24
+ # Opening the website in the chrome browser
25
+ driver.get(website)
26
+
27
+ rec_file = f"{getcwd()}\\input.txt"
28
+
29
+ def listen():
30
+ try:
31
+ start_button = WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.ID, "startButton")))
32
+ start_button.click()
33
+ print("Listening...")
34
+ output_text = ""
35
+ is_second_click = False
36
+ while True:
37
+ ouput_element = WebDriverWait(driver,20).until(EC.presence_of_element_located((By.ID, "output")))
38
+ current_text = ouput_element.text.strip()
39
+ if "start Listening" in start_button.text and is_second_click:
40
+ if output_text:
41
+ is_second_click = False
42
+ elif "Listening..." in start_button.text:
43
+ is_second_click = True
44
+ if current_text != output_text:
45
+ output_text = current_text
46
+ with open(rec_file, "w") as file:
47
+ file.write(output_text.lower())
48
+ print ("USER: " + output_text)
49
+ except KeyboardInterrupt:
50
+ pass
51
+ except Exception as e:
52
+ print(e)
53
+
54
+
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: NetHyTech-STT-Labib
3
+ Version: 0.1
4
+ Summary: A speech-to-text model using deep learning techniques created by Labib Mahmud. It utilizes a web-based interface for real-time speech recognition and transcription.
5
+ Author: Labib Mahmud
6
+ Author-email: exampl@gmail.com
7
+ Dynamic: author
8
+ Dynamic: author-email
9
+ Dynamic: summary
@@ -0,0 +1,5 @@
1
+ NetHytech_STT/__init__.py,sha256=i1OODKJ4on_xg_rw55Sct4OQkRNPrpsSk7oPIjYkljw,2052
2
+ nethytech_stt_labib-0.1.dist-info/METADATA,sha256=llt0XdkoOjNhtxAXyzv3LnSful0QrgFK4Zmoplf3xrI,351
3
+ nethytech_stt_labib-0.1.dist-info/WHEEL,sha256=YLJXdYXQ2FQ0Uqn2J-6iEIC-3iOey8lH3xCtvFLkd8Q,91
4
+ nethytech_stt_labib-0.1.dist-info/top_level.txt,sha256=RdQvg0N6leZ3nA524_mj3kxZ9o0F2-8SCTH09CMeHdo,14
5
+ nethytech_stt_labib-0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (81.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ NetHytech_STT