Azure Cognitive Services Speech on Blazor-- C# / JS? extremely confused - javascript

I'm running a Blazor site, and I've read that for Microsoft Cognitive Services TTS, I need to use the Javascript SDK.
Okay, so I get to the following JS samples page, with two folders: one for "node.js" and one for "browser", which I interpret to mean "not requiring node.js"
https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/samples/js/browser
Prerequisites
A subscription key for the Speech service. See Try the speech service for free.
A PC or Mac, with a working speaker.
A text editor.
Ensure you have Node.js installed.
Okay. . . so is it or is it ain't possible to use this framework in vanilla Javascript?

Related

Is it possible to design GUI with HTML+CSS+JavaScript but it will actually run python script?

I've built a very simple assistant app in python which can do very basic tasks like taking notes, reminding you, stopwatch, timer, web scrape for news feeds etc. tkinter seems confusing and looks oldish to me. On the other hand, css js seems much easier to design gui side and way more elegant looking. Is it possible to design a desktop gui app (may be with electron?) using HTML+CSS+JavaScript but it will run my old python codes?
I've been coding for only two months and i suck at it. Please excuse my newbiness.
TLDR: Simply, i want to make the gui side using HTML+CSS+JavaScript to take user input but then it will run python scripts and shows output in the gui app. Is it possible?
It can't be done, you'd have to make it like a web app (although with local webserver serving python responses)
EDIT:
if you don't mind running it in webbrowser, you can make quite easily webserver, that will evaluate your queries...
The popular form of Javascript or ES6 (which you are talking about) is designed to run in browser, so, the limitations are that it can only make calls via browser, i.e. it cannot directly interact with the OS like python's OS module. This means you will need a web-service in your computer that would run a specific python code and return you the responses, this requires a web-service/web-framework, preferably python's like Django, Flask which will run the python script for you because they can make OS calls on the server machine. I do think other non-python web-services are cacpable to do so, but of course, the natural preference would be 'Python-based services'.
Sidenote:
If the case was with Node.js(i.e. the server-side js) and not ES6(client-side browser-run) you would have an upperhand i.e. you could invoke python scripts on your server because node.js like the python-based web-servers do support os calls.
Kinda, but its real ugly. If you can host your data and whatnot the other approaches will work.
You have to build your project around nw.js. Essentially it is a Chromium build that adds local file system access back in. You can build an HTML+JS Front end and access a node.js backend running in the same thread. Via node you can shellout to call your python program, or run a local python web server.
I built a mapping app that allowed the user to select a local file, process it on the local machine with python and display the results in an interactive D3 app with geojson based layers of the UnitedStates. Since the data was proprietary I could not host it outside the company. Since I was not IT, I could not host it inside the company. nw.js allowed me to package everything into an installer and deploy to other people within the company as a standalone app.
See here for more information:
Official site: http://nwjs.io
Official documentation: http://docs.nwjs.io/
Introduction
NW.js is an app runtime based on Chromium and node.js. You can write native apps in HTML and JavaScript with NW.js. It also lets you call Node.js modules directly from the DOM and enables a new way of writing native applications with all Web technologies.
It was created in the Intel Open Source Technology Center.
Features
Apps written in modern HTML5, CSS3, JS and WebGL.
Complete supportfor Node.js APIs and all its third party modules.
Good performance: Node and WebKit run in the same thread: Function
calls are made straightforward; objects are in the same heap and
can just reference each other;
Easy to package and distribute apps. Available on Linux, Mac OS X
and Windows

Web scraping in react-native ios?

I am building an iOS app with react-native and looking to do some web scraping. From my understanding traditional npm packages don't work because they rely on Node.js. I know there are Objective-C/Swift libraries for web scraping but I don't understand how I would integrate those into a react-native component.
Anyone have any ideas on how to get information from a website (web scraping) in react-native?
Interesting question. Architecturally, it might be a good idea to consider building a service which can provide the scraped data via an API. The more processing power the client requires (the heavier the client-side code), the more likely you are to run into lagging / stuttering issues in the app. Phones have come a long way, but still can't match a server's power.
If you want to press ahead, I would advise using the browserified version of Cheerio.js. Basically, browserify lets you take code written for node, and use it in a browser environment. You would need to test it in JS Core on IOS, but there's a good chance everything will work.
One other option is using jQuery's load function or the fetch api included in React Native to make the call to the site (you don't have to worry about CORS), and parse the result manually.

Microsoft EWS with Apache Cordova

I am trying to build an app using Apache Cordova that involves using Microsoft EWS to access my Outlook account.
I currently have a working app using MVC but I cannot add similar references to the Cordova project in order for me to make similar calls to EWS. Are there any javascript API's or anything that I can add to be able to gain access to the functions I need?
thanks
For your question about JavaScript api availability with EWS, the answer is NO, there is no official library available. I have published a port of official ews-managed-api from c# to JavaScript on npm named ews-javascript-api for nodejs community, it can be modified to used with cordova (MIT license).
If you can be more specific to what exactly you want to achieve in JavaScript, I can provide code sample.

Is there any document for Tizen Web App Template? (like media controller, camera, pedometer)

When I create a new Tizen Wearable Web Project, Tizen IDE provides sample web apps like Camera, Media Controller, Pedometer. So, I created 'media controller template' for my project. But, it contains lot of js code. And I think that codes have something difference with usual javascript for webpage. So, I want to understand how it works, and how use jquery in this project either.
You may need to do some research on developing Tizen Wearable apps - specifically go through the tutorials provided by Samsung which step through the foundations of Tizen Wearable development.
Tizen wearable apps are written in HTML5 (basically CSS, js and html), and the samples you are looking at reference the Tizen sdk. Just read through the the documentation and you will see that there are js calls to the Tizen apis which are most certainly not like 'usual javascrpt for webpage'.
The "difference" you notice may also be because the js code in the samples are written using the functional programming paradigm. This can be confusing for beginner programmers or programmers that are new to functional programming.
However, reading the documentation (IDE > Help > Help Content) will give a great idea of the various api's and how to call them. For example, there are some posts and sample code using "regular" javascript to implement similar functions in the samples ...
denvycom.com/blog/accelerometer-data-in-javascript-in-your-gear-2/
http://denvycom.com/blog/how-to-add-gestures-tap-swipe-to-your-gear-2-app/
-V.

adMod with phonegap cloud build

I have an HTML5&JavaScript application that I am building using PhoneGap's cloud build. I can't find a way to implement adMob into the app without using Java in some way.
I built the app using notpadd++, and and the PhoneGap cloud with github and i don't have a single line of Java. My research showed me that using AdSense on a mobile application is not allowed, so I'm in a bit of a pickle...
I'm on PhoneGap version 3.1.0.
There are some plugins that you can find through the docs at Phonegap Build but at present there is not an easy way to do this.
This is one of the things that many users have been asking for (including me). Please go to the PGB support community and add your voice to those who want this.

Categories

Resources