HTML5 web audio getting stuck (buffering issue?) - audio

I am working on a (weekly radio show) audio website and I keep getting the same problem, the audio files that are up to 1hr long keep getting stuck.
I have tested several different players, both the flash player Wimpy Player, and HTML5 players such as Audio5js, jPlayer, and pickle player.
AND I have tested to sample the sound in different bit rates, 8,24,64,128 but the sound files keeps getting stuck. Not always, but often enough to be a serious problem.
The file starts playing but a bit in (all from a few seconds to almost at the end of the 1 hr show) it just stops and the only way to keep playing it is to reload the file. To me it seems like a buffering problem.
I don't understand why.
If anyone has ever had a similar problem, please tell me what I am missing.

I got the answer myself to this one.
After double-, triple-, quadruple-checking everything it hit me, the site was hosted by GoDaddy and I know that it is not the best quality you can expect from them. (Actually they are really bad in more than one way. Never go with GoDaddy if you can avoid it. Just my personal opinion.)
We changed the hosting and the problem was gone.
To bad it had cost me days of work for nothing.

Related

Capture voice from a stream and translate it

I hoped that potentially there is something that will help me do it with just one step, however there might be other steps for it.
The problem is, that there is a game I follow, however all the major informations (devblogs and streams) is passed over mostly in french. Today there is one stream on Twitch that I would love to understand, however French has never crossed my path outside of the game. I was hoping there would be a way for me to launch the stream, capture the text spoken during it and translate it to English.
So far, the best idea that came to my mind would be to open up google translate, turn the volume up and let it speak to itself, however I hoped there would be something that listens to an application/window inside the system without the use of the actual microphone and speaker.
Enjoy your day, all!

Cardboard headtracking with no gyro

I have a LG G3 phone which after some testing does not have a gyroscope(only accelerometer) and I've been testing the Cardboard with it and faced some issues.
Sometimes the camera can suddently jump up to 90 degrees in any direction from where I was looking, and this can at it's worst happen every 10 seconds or so(usually about every 30sec). I did test the accelerometer output and it didn't seem to be that inaccurate that the camera would jump that much. I've looked around and found a couple of other users reporting the same issue too.
This issue is present not only in the Unity Cardboard SDK Demo but also in some vr apps, and by some I mean there are a couple of apps that I've tried that works perfectly fine(Can't remember which ones right now but one was a roller coaster vr app). Though this issue is really apparent in the Cardboard Labs app.
This jumpyness doesn't only destroy the immersion but also induces a bit of desorientation aswell as nausea when the jumping gets really bad. I had a hard time finishing the Cardboard Labs tests because of this...
Soo last but not least can the headtracking code be optimized for phones without a gyro so that these experiences can be improved? If not on the google side of the SDK, is there anything I can do to the SDK to help minimize this effect?
Ok, so after some testing I seem to have it fixed now.
The reason seems to be that since I have rooted my device and I'm often fiddling with the frequency of the CPU in it the motion tracking somehow gets messed up. This can easily be fixed with a reboot with stock clocks.
I'm not sure if it has to do with the polling of the motion sensor fetching incorrect data when it's reading too fast or if it's the cpu that can't keep up but nevertheless, I seem to be stuck with stock clocks if I'm going to play VR games. I'm leaving this question here for those who might have the same issue.
EDIT: After some more testing the issue reappeared after a while. I'm guessing there is an app or service that might be the problem here because after a restart it's fixed again.. I'll post more when I've tested it further.

Audio processing steganography on iOS

For one of our projects, we got a new requirement on our hands but I don't have any idea about how to do it.
We need to process audio captured from the environment and do something in the app (show a message, picture, etc) when a specific pattern is recognized.
The first thing that came to my mind when I heard this requirement was Shazam. I did a little research and found Echo Print library (http://echoprint.me). I think that works on the whole of the songs, what I need to do is constantly listen to environment and act when the patterns are recognized. I don't know anything about audio processing (at least for now) but this sounds more like steganography. Correct me if I'm wrong.
Any help will be greatly appreciated!
EDIT: I think I need to correct some points in my question. Yes, the application will listen to the environment but it will recognize the patterns in a pre-configured audio. A specific song on a radio, a dog bark, etc. So the patterns will be artificially defined in the audio.
Thanks.

How to Serve/Stream Multiple Audio Files

I'm working on a project where we have many small audio files of around 500-600k. Then there are audio files of around 15M.
The 15M files are full narrated articles. The smaller ones are individual sentences within the article.
There are going to be many users and many articles in the future.
I want to be able to load the audio files relatively fast -- either through pre-loading or streaming or something of that nature. Basically if a user clicks on a button -- I want the audio to start more or less immediately.
What are my options here? Red5? Icecast?
EDIT:
I'd like to avoid flash if at all possible but not opposed to it -- I definitely can't use html5 audio as much as I'd like too.
I've already tried doing document onload to issue get requests for the files -- there are usually 15-20 per page. (19 small files, one big one). That doesn't seem to work as well as I thought it might.
In terms of latency -- I'm looking for push-button instant play -- right now I can count to 2 or 3 for the small files and 6-7 for the big one. Flash would be able to do this?
Streaming solutions such as Icecast are not appropriate here. All you need is simple HTTP.
You don't mention what you are playing these things on the client side with. If you are doing this in flash, it is relatively simple to preload or play while the download is still running.
For audio compression, you should be using MP3. For speech, you can easily get away with a lower bitrate. 48kbit 44.1kHz Mono is generally acceptable. This will load fine, even on decent mobile connections.
In any case, HTTP is the way to go. That way you can request the separate files easily. Icecast is for a single stream that runs for awhile, such as internet radio.
ok -- so i did some investigation and figured out what the competition was using
it was this:
http://www.schillmania.com/projects/soundmanager2/
basically what it does is try and use html5 audio tags with the ever so helpful 'preload=true' flag set and if it can't do that it fallsback on flash to preload the mp3

Improve Concentration/Workspace?

How do you get yourself in the "zone" for programming? As a CS undergrad I've been finding it difficult to get focused in. I think part of my problem is I do not have "proper" workspace living in the dorms. Any ideas or tips? (Perhaps good thinking music, whiteboards? etc)
The best way I found yet is to turn off the Internet. Since opening my browser and browsing to some random site has become almost a reflex, I deactivate my network card for the time I need to work. This way I have the time to realise what I am doing before it is too late. The Internet must be the number one "Zone Killer" I know...
Truthfully, nobody can tell you about you, they can only tell you about them. That may help, or it may not.
I've seen people able to get "in the zone" on a commuter train car. I've seen people who have it broken when the air conditioner kicks in.
Here's what works for me:
Need no people talking to me. I can't keep the ideas juggling while explaining them or having other ideas tossed in to the mix. I know, pair programming can be great - but I've never been "in the zone" while pair programming.
Music is okay, but no playlists with wildly different styles, or songs I absolutely love.
It almost always kicks off when I'm frustrated by something but then have an idea how to solve one aspect of the problem... then things flow from there.
I need a desk clean enough that nothing on it distracts my attention and makes me think - no dev magazines with interesting tech on the cover, no dishes with mold on them, etc.
I need about 20 square feet to get up, pace for 2-3 steps, then sit back down. Too much room gets me too far away from the computer. Too little room and I feel confined.
As soon as I solve the problem, I'm normally out of the zone. A phone call or person at my desk will break it. Stopping to answer email "toast" will kill it too.
But again, this is me. All of this may actually be the reverse for you - You'll find it eventually, I'm sure. Just don't give up, and don't take personal anecdotes and advise or internet blog posts as absolute truth - "the zone" is very much a personal thing.
One small thing which helped me a lot was to get noise cancelling headphones. These are a bit pricey, but being able to switch on silence is great!

Resources