jpemartins / amr.js Goto Github PK
View Code? Open in Web Editor NEWAMR-NB codec in Javascript. Mirror from https://code.ua.pt/projects/amr-js
AMR-NB codec in Javascript. Mirror from https://code.ua.pt/projects/amr-js
from 'https://github.com/jussi-kalliokoski/pcmdata.js/tree/master/js ' download javascript
<script src="http://localhost/binarystream.js"></script>
<script src="http://localhost/pcmdata.js"></script>
<script>
fetch("https://raw.githubusercontent.com/Binaryify/amrToMp3/master/src/amr/abcdef 1544497148360.1526463056869.amr").then(resp=>resp.arrayBuffer()).then(ab=>{
var incomingData = new Uint8Array(ab); // create a uint8 view on the ArrayBuffer
var i, l = incomingData.length; // length, we need this for the loop
var outputData = new Float32Array(incomingData.length); // create the Float32Array for output
for (i = 0; i < l; i++) {
outputData[i] = (incomingData[i] - 128) / 128.0; // convert audio to float
}
var waveData = PCMData.encode({
sampleRate: 8000,
channelCount: 1,
bytesPerSample: 2,
data: outputData
});
var element = new Audio();
element.src = "data:audio/wav;base64,"+btoa(waveData);
element.play();
});
</script>
Thanks for publishing this, it's exactly what I needed. Does it use the same license as opencore-amr (Apache)?
high,
Thanks for posting this. Unfortunately, I haven't been able to get it working in Chrome. It does not decode AMR files recorded in Android 3.x nor 4.x and I cannot initiate WAV file playback either. I've been digging through the code for a couple of days now. Everything runs smoothly and I can verify that sound files are being read. I just don't get any sound nor am I able to write files. Can you help me with this?
Thanks,
Jair-Rôhm
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.