简体   繁体   English

如何将音频Blob保存在文件系统中

[英]How can i save my audio blob in file system

I'm using jquery.voice.min.js and recorderWorker.js/recorder.js for to record audio with html5. 我正在使用jquery.voice.min.js和recorderWorker.js / recorder.js来录制html5音频。 At the moment I get to record audio and i get to url download html5 audio. 此刻,我开始录制音频,并转到url下载html5音频。

I want to save blob/audio html5 in my file system, but i dont know how. 我想在文件系统中保存Blob /音频html5,但我不知道如何。

When I get the url with audio i use this c How to ode, but i dont want to donwload audio, only want to save that blob audio in file system. 当我获得带有音频的URL时,我将使用此c如何进行ode,但我不想下载音频,只想将该blob音频保存在文件系统中。 How I can treat blob file for it? 我该如何处理Blob文件?

$.voice.export(function(url){
 console.log(url); // blob:http://vshaker.com/934a8934-e11a-4049-b133-fcec8e240b29 
}, "URL");

Any clue, any idea? 任何线索,任何想法? Regards! 问候!

Just replace the URL with base64 and you will get a base64 string of the corresponding audio. 只需将URL替换为base64,您将获得相应音频的base64字符串。

    $.voice.export(function(url){
    console.log(url); // blob:http://vshaker.com/934a8934-e11a-4049-b133-fcec8e240b29 
    }, "base64");

post the base64data to server. 将base64data发布到服务器。 create the audio file using any of the server side language and keep any where in the file system. 使用任何一种服务器端语言创建音频文件,并将其保留在文件系统中的任何位置。 update the new web path to the audio source. 将新的Web路径更新为音频源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM