473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

saving a voice file in .net

Hi all,

In my application i record a voice in vxml page and post it in .aspx page. I could not able to save the file in .net. how to do this..
The sample .net code is as follows.

Expand|Select|Wrap|Line Numbers
  1. if(Request["requestWav"] != null) {
  2.    StreamReader sr = new StreamReader(Request.InputStream);
  3.    string wavFile = sr.ReadToEnd();
  4.    int nDex = wavFile.IndexOf('=');
  5.    if(nDex != -1) {
  6.       wavFile = wavFile.Remove(0, nDex+1);
  7.    }
  8.    byte[] ba = HttpUtility.UrlDecodeToBytes(wavFile);
  9.    // To create a unique file name
  10.    string fileName = DateTime.Now.Ticks.ToString() + ".wav";
  11.    string filePath = "recording/" + fileName;
  12.    FileStream fs = new FileStream(filePath, FileMode.CreateNew);
  13.    BinaryWriter bw = new BinaryWriter(fs);
  14.    bw.Write(ba);
  15.    bw.Flush();
  16.    fs.Close();
  17. }

Kindly suggest a solution for this.

Thanks,
guru
Jan 18 '08 #1
2 1126
kenobewan
4,871 Expert 4TB
What happens if you create a link to the file path, although not sure if format is ok.
Jan 18 '08 #2
What happens if you create a link to the file path, although not sure if format is ok.
Hi,

The recorded file is in a variable(requestWav) and it is posted to this .net page. How to access the file and save it via .net.
I saved the recorded file using php but i couldnt do it in .net. Kindly suggest a solution.

Thanks,
Kumaraguru
Jan 19 '08 #3

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

Similar topics

14
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great...
45
by: Stephen Poley | last post by:
People in these groups, and on web-pages, not infrequently suggest that it is worthwhile cutting down on white-space and comments in HTML and CSS in order to reduce loading times. I and others have...
5
by: Mad Scientist Jr | last post by:
I'm trying to record a voice memo on a Pocket PC (2000) from VB.NET (smart device application from vs.net 2003). Tom Shelton did an initial conversion to VB.NET which I am trying to run, but am...
0
by: Emma Gumbdough | last post by:
Okay we have here a VB.NET version of the .net compact framework voice recorder sample that uses open net CF c# version at: http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=79 THIS CODE...
0
by: chenzq666 | last post by:
I hadn't either, at least until the other day when I stumbled across www.voiceemotion.com. It provides, as the name suggests, an application to be used with "voice" and from what I gather, just as...
4
by: Jake | last post by:
I'd like to programmatically play a Voice Tag associated with a Windows Mobile 5 contact. If anyone has any info on this, that would be great. I'm using VS2005 and C#. I have an IMate SP5 if it...
1
seshu
by: seshu | last post by:
Hi Everybody Here i have a small doubt in the fileinfo class there is a property called file.length here it is showing the size of the voice file but what i want to know is what...
2
by: BigC | last post by:
I am using the following line of code to save a voice file (.wav) to disk and it works fine when the filename contains no spaces. However the file doesn't get saved when its name contains a space....
2
by: patr0805 | last post by:
Hi I have created a voice regnocnition program but I can't get it to work. The problem comes when my program comes to the command: VoiceCmd.Initialized = 1. It says access denied exception from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.