how to generate sound of exact frequecy in javascript - javascript

I want to create a project in JavaScript in which I want to generate sounds of all frequency from 20 to 20K. is there any way to do ?
I have used http://codebase.es/riffwave/ this library also but if I select frequency of sound greater than 20K db, I am still hearing that. so this js library is not accurate according to my need.
can you suggest some way in achieving my task.

The Web Audio API can be used to generate sounds.
http://chimera.labs.oreilly.com/books/1234000001552/ch04.html#s04_5

Related

javascript audio API -- analyze audio file to detect exact sounds, for lip syncing

I've seen things like waveform.js which uses the Web Audio API to display waveform data, and there are many other tools out there which are able to analyze the exact sound points of an audio file in JavaScript.
If so, it should be possible to use this power of analyzation to use for real-time lip syncing using JavaScript, i.e., to get an animated character to speak at the same time the user is speaking, by simply using an audio context, and reading the data-points some how to find the right sounds.
So the question becomes, more specifically:
How exactly do I analyze audio data to extract what exact sounds are made at specific timestamps?
I want to get the end result of something like Rhubarb Lip Sync, except with JavaScript, and in real time. It doesn't have to be exact, but as close as possible.
There is no algorithm that allows you to detect phonemes correctly 100% of the time.
You didn't say whether this was for real-time use or for offline use, but that would strongly affect which algorithm you'd use.
An algorithm based on mel frequency cepstral coefficients would be expected to give you about 80% accuracy, which would be good enough for video games or the like.
Deep learning systems based on covolutional neural nets would give you excellent recognition, but they are not real time systems (yet).
You could maybe start with Meyda, for example, and compare the audio features of the signal you're listening to, with a human-cataloged library of audio features for each phoneme.

JavaScript - Convert webm to mp4

I have looked a bit around, but I couldn't find a proper library and everyone point at a different direction.
So my question is simple; is it possible to convert a media (webm) on a web page to mp4 and immediatly start the download ?
I'm making an extansion for firefox, but I have no idea how to do the conversion part.
I wouldn't recommend handling something as complicated as conversion by yourself, and instead would use something like https://cloudconvert.com/api as a background service, so your plugin will query that API upload/download, and output to the users browser.

How to use NLP to parse naturally written commands?

I am fairly new to NLP in general. My goal is to create some kind of parser that can easily find files on my various hard drives.
I have no idea how to properly parse the input to transform it into any managable representation that a program can easily use to create a given output.
For example, the following sentences should return a list of documents:
documents created 3 months ago
documents modified 2 weeks ago
photos taken in china (this one would then use the GPS data within the image file)
It can probably be easily done using some kind of Regex pattern (<filetype> <action> <time>) but I would love to make it more flexible.
I looked into compromise, a JS library that has some easy to use API to retrieve specific parts of the input. But I kind of doubt that calling methods like calculatedResult.nouns()[0] and calculatedResult.verbs()[0].stem() should be used to parse the commands as those require a fixed kind of syntax.
Any tips on how to achieve my goal? I am not sure if using ML and training a custom model is the way to go. I never use ML and, based on my low knowledge of it, it seems kind of hard to train it constructs like those (as I would need a LOT of example sentences but there is just a finite amount of realisically used combinations that make sense).
The NLP technique you need to explore is intent detection. You can either integrate a NLP library like RASA or Spacy into your program or work with a commercial API that conducts intent detection. You will need example sentences in both cases but probably not as many as you think. Intent detection is a key part of chatbots so there's quite a lot of tools out there. Low level, hands-ons ML development is not really needed these days with all the high level intent detection tools out there.

is it possible to make swiffy object start playing by skipping the first 100 frames?

I have 100s of fla files and I do not want to manipulate them I just want to find a javascript solution to figure out how to skip the first 100 frames in my animation.
I tried to look at the SO but it seems only pause/resume option is available.
We faced a similar problem. The Google Swiffy runtime doesn't provide an API for going to a particular frame; however, it does allow you to setFlashVars. You can use that to send "messages" to whatever API you create in your ActionScript.
With hundreds or thousands of animations, you'll need to automate the processing anyhow, so just mix into your build process some calls to JSFL to inject the desired ActionScript API.

How would I create a web based dynamic mind mapping application in Javascript?

I am trying to create a type of mind mapping software that runs on the web, and I am trying to figure out where to start. I would like this to be able to be used by the most number of people possible. My web application is currently written using Javascript for the front end and C# for the back-end.
I was thinking of using Javascript for this. Unfortunately, the most experience I have with Javascript is with basic DOM manipulating using JQuery and cannot really figure out how I would create mind map bubbles with interactive elements inside of them.
There are one or two mind mapping jquery plugins I have found but all don't function the way I need to (too much animation, slow, doesn't look easy to add and remove elements easily, doesn't work in IE, etc...) so I am looking at creating my own system but I have no idea how I would even approach this type of thing with JS.
HTML5 is not an option as it looks to be low availability at this point.
Raphaƫl in combination with the Dracula Graph Library will get you started.
Be prepared to do some scripting of your own. (for example: i quickly checked the source of the dracula graph library. The graph has no method removeNode, but it is really easy to add it )

Categories