This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
from predict import * | |
from agora_community_sdk import AgoraRTC | |
client = AgoraRTC.create_watcher("ab8078b5b58e4835af33a37580dbc864", "chromedriver.exe") | |
client.join_channel("test") | |
users = client.get_users() # Gets references to everyone participating in the call | |
user1 = users[0] # Can reference users in a list | |
binary_image = user1.frame | |
with open("ASL.jpg") as f: | |
f.write(binary_image) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def withoutSkinSegment(): | |
window_name = "ASL" | |
frame_height, frame_width, roi_height, roi_width = 480, 900, 200, 200 | |
cap = cv2.VideoCapture("ASL.jpg") | |
cv2.namedWindow(window_name, cv2.WND_PROP_FULLSCREEN) | |
x_start, y_start = 100, 100 | |
sentence = "" | |
while True: | |
ret, frame = cap.read() | |
if ret is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from agora_community_sdk import AgoraRTC | |
client = AgoraRTC.create_watcher("app-id", "chromedriver link") | |
client.join_channel("channel-name") | |
users = client.get_users() # Gets references to everyone participating in the call | |
user1 = users[0] # reference the broadcasting user | |
binary_image = user1.frame # Gets the latest frame from the stream as a PIL image | |
binary_image.save("link to in.png file(high resolution)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await page.select('#phone_route_voice_handler', 'relay_agora').then(async()=>{ console.log("SUCCESS!")}).catch(()=>{console.log("FAILED TO SELECT AGORA CONNECTOR")}); | |
await page.select("select#phone_route_call_agora_connector_id", req.body.connectorname) | |
const input = await page.$('#phone_route_call_agora_channel'); | |
await input.click({ clickCount: 3 }) | |
await input.type(req.body.channel); | |
await page.$eval('input[name=commit]', el => el.click()).then(async()=>{ await page.waitForNavigation({waitUntil: 'load'})}).catch(()=>{console.log("SUCCESS")});; | |
await browser.close(); | |
reply += "Call on: " + ans; | |
await res.send(reply); | |
await setTimeout((function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if((page.url()==(req.body.sigspace+'/connectors/new?kind=agora')) && (await page.$eval('h1', el => el.innerText) == "Whoops!")){ | |
reply += "OOPS! The SignalWire Server is down. Try again later."; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect = '.col-4 > a' | |
await page.waitForSelector(connect) | |
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href)) | |
await page.goto(connectlink[0]); | |
const num = await page.$eval('h1', el => el.innerText); | |
ans = num; | |
console.log(num); | |
connect = '.text-lg-right.mt-3 > a' | |
await page.waitForSelector(connect) | |
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await page.waitForSelector('#relay_connector_name') | |
await page.type('#relay_connector_name', req.body.connectorname); | |
await page.waitForSelector('#relay_connector_token') | |
await page.type('#relay_connector_token', req.body.appid); | |
await page.keyboard.press('Enter').then(async () => { await page.waitForNavigation({waitUntil: 'load'})}).catch(()=>{console.log("FAIL")}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
connect = '.text-center > a' | |
await page.waitForSelector(connect).then(()=>{console.log("Success!")}).catch(()=>{console.log("All numbers exhausted!")}) | |
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href)) | |
await page.goto(connectlink[0]); | |
connect = '.card-footer > a' | |
await page.waitForSelector(connect) | |
connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href)) | |
await page.goto(connectlink[2]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let connect = '#navExpand > ul > li > a' | |
await page.waitForSelector(connect) | |
let connectlink = await page.$$eval(connect, am => am.filter(e => e.href).map(e => e.href)) | |
await page.goto(connectlink[6]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(links[1]=='https://ramshri.signalwire.com/phone_numbers/new' || links[2]=='https://ramshri.signalwire.com/phone_numbers/new') | |
{ | |
if(link[1]=='https://ramshri.signalwire.com/phone_numbers/new') | |
{ | |
await page.goto(links[1]) | |
} | |
else | |
{ | |
await page.goto(links[2]) | |
} |
NewerOlder