Thank you very much for your reply.
Ajax yes. I need ajax because i need it to feel like an application.
I am thinking of calling php scripts through ajax. The php scripts are supposed to call the bash scripts. Now i am thinking if i should try to write some of these bash scripts using php. Would that make anything better?... Does it make any difference.?
I am not sure if i can fully describe what these scripts do. But let me get to another level of abstraction here. They are supposed to receive audio from the browser that will be recorded and sent to the server using a recording script called recorder.js and ajax respectively. You might have come across that. Scripts are supposed to process that and output text and also processed audio back to the browser. Where audio will be played back and text displayed.
I am currently doing this with ajax and some weird polling mechanism. I do not like it actually, but it 'just works'. The method would not survive the beating of a regular user. Works under ideal conditions on the local host. I need to know how the a true web dev would approach this situation.