netHighTech-STT 1.0.5__tar.gz
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.
- nethightech_stt-1.0.5/MANIFEST.in +1 -0
- nethightech_stt-1.0.5/PKG-INFO +12 -0
- nethightech_stt-1.0.5/netHighTech_STT/__init__.py +39 -0
- nethightech_stt-1.0.5/netHighTech_STT.egg-info/PKG-INFO +12 -0
- nethightech_stt-1.0.5/netHighTech_STT.egg-info/SOURCES.txt +8 -0
- nethightech_stt-1.0.5/netHighTech_STT.egg-info/dependency_links.txt +1 -0
- nethightech_stt-1.0.5/netHighTech_STT.egg-info/requires.txt +2 -0
- nethightech_stt-1.0.5/netHighTech_STT.egg-info/top_level.txt +1 -0
- nethightech_stt-1.0.5/setup.cfg +4 -0
- nethightech_stt-1.0.5/setup.py +15 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include netHighTech *.html *.js *.css *.txt
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netHighTech_STT
|
|
3
|
+
Version: 1.0.5
|
|
4
|
+
Summary: Speech recognition Jarvis package
|
|
5
|
+
Author: Zubair Khan
|
|
6
|
+
Author-email: zubairdev00@gmail.com
|
|
7
|
+
Requires-Dist: selenium
|
|
8
|
+
Requires-Dist: webdriver-manager
|
|
9
|
+
Dynamic: author
|
|
10
|
+
Dynamic: author-email
|
|
11
|
+
Dynamic: requires-dist
|
|
12
|
+
Dynamic: summary
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import os
|
|
3
|
+
from selenium import webdriver
|
|
4
|
+
from selenium.webdriver.common.by import By
|
|
5
|
+
from selenium.webdriver.chrome.service import Service
|
|
6
|
+
from webdriver_manager.chrome import ChromeDriverManager
|
|
7
|
+
|
|
8
|
+
# Dynamic Path nikalne ke liye
|
|
9
|
+
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
10
|
+
|
|
11
|
+
def listen():
|
|
12
|
+
chrome_options = webdriver.ChromeOptions()
|
|
13
|
+
chrome_options.add_argument("--use-fake-ui-for-media-stream")
|
|
14
|
+
# Shuru mein headless OFF rakho taake error dikhay
|
|
15
|
+
chrome_options.add_argument("--headless=new")
|
|
16
|
+
|
|
17
|
+
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
|
|
18
|
+
|
|
19
|
+
# Path ko join karne ka sahi tarika
|
|
20
|
+
html_path = f"file:///{os.path.join(BASE_DIR, 'index.html')}"
|
|
21
|
+
input_path = os.path.join(BASE_DIR, "input.txt")
|
|
22
|
+
|
|
23
|
+
driver.get(html_path)
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
# Start button click
|
|
27
|
+
driver.find_element(By.ID, 'start-btn').click()
|
|
28
|
+
print("Jarvis is Listening...")
|
|
29
|
+
|
|
30
|
+
while True:
|
|
31
|
+
output = driver.find_element(By.ID, 'result').text.strip()
|
|
32
|
+
if len(output) > 1:
|
|
33
|
+
with open(input_path, 'w', encoding='utf-8') as f:
|
|
34
|
+
f.write(output)
|
|
35
|
+
print("Heard:", output)
|
|
36
|
+
driver.execute_script("document.getElementById('result').textContent = '';")
|
|
37
|
+
time.sleep(0.5)
|
|
38
|
+
except Exception as e:
|
|
39
|
+
print(f"Error: {e}")
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netHighTech_STT
|
|
3
|
+
Version: 1.0.5
|
|
4
|
+
Summary: Speech recognition Jarvis package
|
|
5
|
+
Author: Zubair Khan
|
|
6
|
+
Author-email: zubairdev00@gmail.com
|
|
7
|
+
Requires-Dist: selenium
|
|
8
|
+
Requires-Dist: webdriver-manager
|
|
9
|
+
Dynamic: author
|
|
10
|
+
Dynamic: author-email
|
|
11
|
+
Dynamic: requires-dist
|
|
12
|
+
Dynamic: summary
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
netHighTech_STT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='netHighTech_STT', # Naya package naam
|
|
5
|
+
version='1.0.5', # Naya version number
|
|
6
|
+
author='Zubair Khan',
|
|
7
|
+
author_email='zubairdev00@gmail.com',
|
|
8
|
+
description='Speech recognition Jarvis package',
|
|
9
|
+
packages=find_packages(),
|
|
10
|
+
include_package_data=True, # Assets shamil karne ke liye
|
|
11
|
+
install_requires=[
|
|
12
|
+
'selenium',
|
|
13
|
+
'webdriver-manager',
|
|
14
|
+
],
|
|
15
|
+
)
|