Vrushabh-STT 0.2__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,73 @@
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
+
9
+ # pip install webdriver-manager
10
+ from webdriver_manager.chrome import ChromeDriverManager
11
+
12
+ from os import getcwd
13
+
14
+
15
+ # Setting up Chrome options with specific arguments
16
+ chrome_options = webdriver.ChromeOptions()
17
+
18
+ chrome_options.add_argument("--use-fake-ui-for-media-stream")
19
+ chrome_options.add_argument("--headless=new")
20
+
21
+ # Setting up the Chrome driver with WebDriverManager and options
22
+ driver = webdriver.Chrome(
23
+ service=Service(ChromeDriverManager().install()),
24
+ options=chrome_options
25
+ )
26
+
27
+ # Creating the URL for the website using the current working directory
28
+ website = "https://allorizenproject1.netlify.app/"
29
+
30
+ # Opening the website in the Chrome browser
31
+ driver.get(website)
32
+
33
+ rec_file = f"{getcwd()}\\input.txt"
34
+
35
+ def listen():
36
+
37
+ try:
38
+ start_button = WebDriverWait(driver,20).until(
39
+ EC.element_to_be_clickable((By.ID,'startButton'))
40
+ )
41
+
42
+ start_button.click()
43
+ print("Listning...")
44
+
45
+ output_text = ""
46
+ is_second_click = False
47
+
48
+ while True:
49
+ output_element = WebDriverWait(driver,20).until(
50
+ EC.presence_of_element_located((By.ID,'output'))
51
+ )
52
+
53
+ current_text = output_element.text.strip()
54
+ if "Start Listning" in start_button.text and is_second_click:
55
+ if output_text:
56
+ is_second_click = True
57
+
58
+ elif "listning..." in start_button.text:
59
+ is_second_click = True
60
+
61
+ if current_text != output_text:
62
+ output_text = current_text
63
+
64
+ with open(rec_file,"w") as file:
65
+ file.write(output_text.lower())
66
+
67
+ print("USER : " + output_text)
68
+
69
+ except KeyboardInterrupt:
70
+ pass
71
+
72
+ except Exception as e:
73
+ print(e)
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.4
2
+ Name: Vrushabh-STT
3
+ Version: 0.2
4
+ Summary: this is speech to text package created by vrushabh
5
+ Author: Vrushabh
6
+ Author-email: vrushabhtandale7@gmail.com
7
+ Dynamic: author
8
+ Dynamic: author-email
9
+ Dynamic: summary
@@ -0,0 +1,5 @@
1
+ vrushabh_STT/__init__.py,sha256=uEj5KP0cOSKnaoSwW1bJzGJOoYWp_VMdkV91cuwiVrM,2082
2
+ vrushabh_stt-0.2.dist-info/METADATA,sha256=vhWK4jIjjgdHahxm8by-ObuIwsu9mwBZC63bh45s8-s,236
3
+ vrushabh_stt-0.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
4
+ vrushabh_stt-0.2.dist-info/top_level.txt,sha256=nWu1Xxy7n_QU1atjLZ01OwNVpfZzaG4h_rj6rAz-DhU,13
5
+ vrushabh_stt-0.2.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ vrushabh_STT