CoffeeScript: Record Voice and output text - javascript

I am making a package for github's atom.
In that I need to record voice and output it on the window.
How do I record voice and output is as text in coffeeScript?

1. Record Voice
This has been asked a lot:
Can I use javascript to record voice on a web app?
Capture Audio Input with flash or html5
HTML5 record audio to file
2. Output as text
Now comes the tricky part (not that the previous step is easy): You need speech recognition. Here are some js libraries you could use:
Pocketsphinx.js
annyang!
Alternative: Web Speech API
If you're up to the task of building your own speech recognition and want to learn new stuff, go ahead. I've done it once with tcl/tk and there was a lot of learning but also fun involved. However, it takes some time to get it right, i.e. get usable results. If you don't want to reinvent the wheel, just use the Web Speech API:
Web Speech API Specification
Web Speech API Demo

Related

Google Cloud Speech API Javascript

I'm working for a university stage and I have to integrate google cloud speech api in a my html5 page to perform speech recognition. I have two problems:
1) I'm searching around the web and I don't find a suitable library to generate an audio file (flac or wav) from microphone.
2) I don't understand if it is impossible using javascript to perform a Google Speech API recognition or not. If it is not: how can I do, considering I have to manage the event of pushing a button?
Thank you!

Web Audio API - record all tab sounds

Is there a way to intercept and record all sounds happening in a browser tab using Audio API or some other method.
Let's say I am watching simultaneously three YouTube videos in one tab, can I record that using Audio API?
This isn't really directly possible (for security and privacy reasons). As a user, it's possible to set it up - by setting a loopback audio driver as your audio output driver for the YT tabs - but not in a totally automated way.
(This is a duplicate, btw - of Cross application audio analysis with the Web Audio API, et al.)
You can use http://goldfirestudios.com/blog/104/howler.js-Modern-Web-Audio-Javascript-Library this javascript library.
This link has full documentation, features and usage. This library works great for games and audio-related web apps. Hope this will help you.

Obtaining audio data from android microphone using Cordova and JavaScript (without getUserMedia)

I need to obtain frequency/pitch data from the microphone of an android device on the fly using JavaScript.
I have done this for desktop/laptop browsers with getUserMedia and Web Audio API, but these are not supported on the vast majority of Android devices.
I have tried using the cordova-plugin-media-capture however this opens an audio recorder which the user can then save or discard, and after saving you can use cordova-plugin-file to obtain the data as shown here: https://stackoverflow.com/a/32097634/5674976 but I need it not to open the audio recorder, and instead perhaps just a record button, and once it is recording to provide the audio data immediately (so that it can detect the frequency data in real-time).
I have seen recording functionality in place e.g. WhatsApp, Facebook Messenger etc. and so as a last resort - since I do not know Java - would it be possible to create a plugin using Java for Cordova?
edit: I have also looked at cordova-plugin-media https://github.com/apache/cordova-plugin-media which seems to provide amplitude data and current position data. I'm thinking I could figure out frequency by looking at the amplitude over time, or am I being naive?
I managed to record audio and also analyze the frequency without either getUserMedia or Web Audio API for Android.
Firstly I installed the cordova-plugin-audioinput plugin, which outputs a stream of audio samples (from the microphone), with custom configurations such as buffer size and sample rate. You can then use this data to detect specific frequencies.

How to Fake Key Stroke For a Web Application?

We have a web application that that works with user camera and keystrokes, collects data on the client side using JS. The data contains the users head movements captured by headtracker.js and keystrokes that are captured as an onscreen test runs in realtime.
We are planning to write end to end test cases for this test flow and the first thing we plan to do is to mock live streaming using recorded videos which is supported by headtracker (it supports ogv, mp4 etc).
Our next challenge is to mock and supply keystrokes to the web application as the test proceeds. So, each action on the UI may (or may not) require a user action through a keystroke which we are planning to automate.
Or is there a tool or technology that allows us to create such a virtual environment which could provide us real time response?
I am able to provide more information as required.
You will want to look at Selenium WebDriver. As for a reliable web browser to driver it from tests, look at phantomjs (and the PhantomJSDriver to control it).
Whatever you do, avoid IE at all cost when using Selenium. If you want to do unit testing with IE, buy a commercial testing framework.

Can I use the Web API & Play Button Widget for a 3rd Party Spotify Mobile App?

I started building a Spotify Client for BlackBerry 10 using the Web API and the Play Button Widget but still have not published to the store since I want to clear up things first.
Please can anyone tell me if it's okay to use the Web API and the Play Button Widget in my 3rd Part Spotify Mobile App?
I use the Web API for authorization, loading playlists, tracks, albums etc, and I plan to use the Play Button Widget to play the full song.
I also plan to make money from it via Removing the Ads that I will integrate.
Link the the App's Details and Screenshots: http://forums.crackberry.com/blackberry-10-apps-f274/spo2fy-native-spotify-client-blackberry-10-a-948673/
Can somebody advise please?
Right now the Developer Terms of Use forbid monetisation either directly or via adverts for applications that stream audio. The Developer ToS can be found here.
Also, the Play Button widget doesn't work on mobile platforms like Blackberry - it requires a desktop machine as it remote controls either the Web Player or Desktop client.
Additionally, although not part of your question — your app looks like a direct copy of Spotify's own UI. In general, this isn't a good idea. This isn't a threat per se, but it's close enough to potentially look like an "official" client, which is also forbidden by the ToS.

Categories

Resources