473,748 Members | 9,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

saving a audio file in .net

5 New Member
Hi all,

How to save the content of the audio file posted from vxml application using .net. I done the same in php but i couldnt do in asp.net.

if(Request["image"] != null)

{


StreamReader sr = new StreamReader(Re quest.InputStre am);

string wavFile = sr.ReadToEnd();

int nDex = wavFile.IndexOf ('=');

if(nDex != -1)

{

wavFile = wavFile.Remove( 0, nDex+1);

}

byte[] ba = HttpUtility.Url DecodeToBytes(w avFile);

// To create a unique file name

string fileName = DateTime.Now.Ti cks.ToString() + ".wav";

string filePath = "http://64.144.216.241: 8085/VXML/Recording/" + fileName;

FileStream fs = new FileStream(file Path, FileMode.Create New);

BinaryWriter bw = new BinaryWriter(fs );

bw.Write(ba);

bw.Flush();

fs.Close();

}

Kindly suggest a soln



Thanks,

Kumaraguru
Jan 29 '08 #1
0 814

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2498
by: Bruce Bon | last post by:
The class below is intended to play a Sun audio file (.au) in the background while the main thread, which is servicing a GUI, continues without impact. It doesn't work. For a sound file that takes 3-5 seconds to play, the main thread hangs for that long. I have run this many times, with changes in printouts and insertion of strategic sleeps to try to make sure that the player thread gives up control, but apparently the call to...
0
1090
by: Tuang | last post by:
Given a URL for an MP3 audio stream, how could I write a little utility that would start the stream flowing, capture it to a disk file, and then disconnect from the stream? I'm imagining that, for example, if I save an hour-long chunk taken out of an MP3 audio stream, I would get an hour-long MP3 file on my hard drive. I'd prefer to use Python, but I'm not sure where to start. Thanks for any tips.
5
16128
by: Mark | last post by:
I have a VB 6 program that I have saved an audio file to using DAO and the appendchunk as is shown at http://support.microsoft.com/kb/103257/EN-US/. ; I have it working fine in that app (it saves to an access database and I can save the data back to a file using getchunk and everything works correctly). The issue is that I am now trying to access the database in VB.NET 2003 through an OleDBDataAdapter (Jet 4.0 connection) and can't get it...
3
4810
by: abrtlt | last post by:
I would like to have a web page in which, when the user clicks on any of several specific elements, a specific audio file is played, without reloading the page. The specific audio file name is obtained from a PHP script (accessing a MySQL database) that could be called using XMLHttpRequest and JavaScript would write in a "div" tag an "embed and play" HTML tag containing the audio file name. I am not sure this would work, as the embed tag...
13
4901
by: anil.rita | last post by:
When the user chooses an AV file to play, based upon the type of file, I want to use the default installed media player to play it. I am wondering if this is a good way - any alternatives, suggestions or improvements? if( wmv file) document.write("<OBJECT id=Player classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 height="354" width="479">
1
1773
by: tarepanda | last post by:
Hi, I'm really clueless on where my code goes wrong in Firefox. Mine is version 2.0.0.6. I have a signed applet that allows for recording, playing back and saving of audio files. The interface which contains record, stop, play and save buttons is done in Flash. So I use javascript for applet-Flash communication. Since I have no control over users' policy files, I wrapped scripts that require special permission in doPrivileged method....
1
6413
by: sho | last post by:
Using the following code i can able to upload all type of files into mysql database with longblob datatype, except video and audio files,where shall i change the code to upload the above said files. <?php if(isset($_POST) && $_POST=="Submit") { $flag=0; if(isset($HTTP_POST_FILES)) { if(is_uploaded_file($HTTP_POST_FILES))
3
4077
by: Julien | last post by:
Hi, I would like to pull out the waveform of an audio file and save it into an image file, for example in GIF format. Is that achievable, and if so, how? I heard about the Snack module, but the project looks dead and un- maintained. Your advice would be greatly appreciated.
1
1747
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= | last post by:
I am using Windows Media Player to play my half second audio files one after the other using the code below... My problem comes when I play a second audio file immediately after the first one stops sometimes on slower computers the audio on the second file gets truncated on the beginning of playing the second file. What can I do to minimize this truncation of audio? Right now I am having to add 1 second of blank audio to the beginning...
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.