read/write an online .wav file in matlab? - html

I am currently working on a signal processing lab for school that requires me to download and analyze a .wav file. I was wondering if there was a way to wavread() or wavwrite() a URL so I don't have to re-download the audio file every-time I move to a new computer or send the code to the members of my group?
All the files can be found here.
And this is the url for one of the .wav files:
http://www.soe.uoguelph.ca/webfiles/sgregori/Audio/speech.wav
I have tried urlread() and urlwrite() but to be honest I don't quite understand what to do with the html coding. I have also tried:
[x,fs]=wavread('http://www.soe.uoguelph.ca/webfiles/sgregori/Audio/speech.wav');
but ended up with the error:
Error using wavread (line 67)
Invalid Wave File. Reason: Cannot open file.
I am also using the student version of Matlab so maybe that is the issue?
Any help would be greatly appreciated!
Thank you.

This should work:
urlwrite('http://www.soe.uoguelph.ca/webfiles/sgregori/Audio/speech.wav','s1.wav');
This saves a file s1.wav to the directory you work on. Then line
[x,fs]=wavread('s1');
should work fine

Related

Edit JSON File in Scratch 3.0

I would like to know if it is possible to edit the JSON file of Scratch 3.0 project. I downloaded a project, changed the name into a .zip, unzipping it, and opening the JSON file that it left. I did not change any line of the JSON code. I compressed the project and changed its name into sb3; but when I upload it the Scratch 3.0 GUI I got this:
Oops! Something went wrong.
We are so sorry, but it looks like Scratch has crashed. This bug has been automatically reported to the Scratch Team. Please refresh your page to try again.
Make sure the folder structure of the new sb3 matches the original. If you zip the outer folder after extracting instead of the files inside, the folder structure won't be what Scratch expects and it will throw an error.

Chrome extension how to append or edit a csv file on pc

I am able to find some information on how to read a csv file on a computer but is there any way I can modify one? In my chrome extension I need to add data to each row one at a time after scraping some websites. Is there any better way then read csv, store data as variable and rewrite is everytime? This becomes problematic when the file gets large. I am looking for a way to “append ” to a existing file or a work around. Any suggestions appreciated.
Update: From comment I see it is not possible to read from file system. But is there anyway to read from within the extension directory? How should I do so if the csv file is included with in the zip file of the extension? Can I access them somehow? Code snippets would be helpful.
I'm in the middle of creating something which might help you. Right now you can upload the CSV file and append a "modifier". You can adjust the code according to your requirement. Here's the repo https://github.com/amanrOnly/CSV_Modifier

File not found when run project from browser

I write a function to read data from excel file, then generate whole datas to JSON. When i test running as application, it works well. But when i call that function into Servlet class and using browser to run it, the file not found exception come. I put the excel file to root folder of my project and URI is the same. Is there any one have ever had same issue with me? and know how to fix it? Thank.

what kind of file has the extension ".json.db"?

I came across a file that have the following extension ".json.db"
I can't find what kind of file is it.
Any ideas.
thanks in advance for your help!
This extension is used by many different databases, run the command file my-file.json.db to try to figure out which one created it.
file is "a file type guesser"

Can i edit the external XML file through AS3?

I want to edit the external XML file through only AS3. Please any one help me.. thanks in advance..
If you are using Flash Player and the XML is on a server then the answer is NO. This would be a lack of security as a client could directly edit something that resides on a server.
It is possible to load the XML, change values in it and then send it back to a PHP file that dumps it into a file, again, with the fore mentioned risks.