TTS to audio (mp3) using c# - c#

i have developed a small application in c# using vs2013 which converts Text to Speech however i want to save that speech automatically in a database as an audio file (.mp3 or any other web supported format). is it possible? how it can be implemented, a code snippet shall be very much appreciated.

You might want to upload the audio file to any directory in your server, and only store the url adress in your Database as a String. You can simply use the FileUpload control.
This is an article which i think can help you. http://www.codeproject.com/Articles/667306/Upload-an-Image-and-an-Audio-file-using-Csharp
Goodluck.

Related

How can I save a webcam-recorded mp4 with audio in Visual C#?

I'm two days into researching this so I thought I'd post here. It looks like video recording software is usually written in C++ but my project requires C#. It's a WPF application and I just need it to save an mp4 locally. I don't need to upload to a server, I don't need to let the user pick a file location, I don't even need it to display the webcam feed as it's recording. All I need it to do is start/stop recording audio and video from a webcam/microphone and save it in a location that's determined by the code. I understand this may be broken down into steps like connecting to a webcam, connecting to a microphone, synchronizing them, encoding a video file, and saving it on the hard drive.
Are there any .NET classes that can help me with this? If not, can anyone recommend some libraries/frameworks/etc. that handle this sort of thing? I appreciate any help regarding how to do this. Thank you.

Converting WAV to M4A using c# NAudio

I want to convert a WAV file into a M4A file.
I could not find any reference or any example of how to achieve that.
Naudio should do the trick i assume, but i havent figured out how to do this yet.
I am writing a WebAPI2 project, and i need to return an m4a audio file to the user upon request. Been using a PushStreamContent in order to provide the user with the file, but using an MP3 as the conversion target, lead to many difficulties with browser support and Seek/Pause/Stop support.
Thanks in advance,
Nokky.
M4A files simply contain AAC encoded audio. Have a look at the Media Foundation Encoder demo in the NAudio WPF demo application to see an example of using MediaFoundationEncoder to create AAC files. It will let you encode as aac if you have an appropriate Media Foundation Codec on your machine (you should have with Win 7 and above, although note that it doesn't do low bitrates).

Playing a video file in server through WPF

I have a video file at my Server and the path to which resembles like "10.151.98.82/Medias/New/Videos/001.dat".
(Actually a video file but the extension is in .dat)
I have already built a WPF application which allows my users to enter the above Server URL and then let them to download it and then play it.
But my guess is that they need not wait till the entire file gets downloaded; just watch the files on the fly.
I have googled on video streaming but could not get a solid material to proceed on with.
[Sorry, if the question is naive or needs modification, i will be happy to do that or move to a relevant forum.]
Any pointers on how to do this is much appreciated.
Edit: This question talks about WCF service and WPF application. But, I dont' use a WCF Service. The video file has to be streamed from the server.
First try to play your file using VLC Player. it also have many advance streaming and Trans-coding Options. you can play, save and trans code simultaneously. Once you are able to Play your file in VLC Player than i would recommend to use VlcDotNet for wpf application. Tutorial for hosting VlcDotNet is available in downloads

Silverlight 4 - encoding PCM data from the microphone

I've written a basic SL4 application to capture audio data from the microphone using CaptureSource. The trouble is, it's raw PCM output - which means huge and uncompressed.
Given that I need this application to run purely within a SL4 environment, how can I compress the PCM audio data into something that can be delivered to a remote server more easily?
Essentially I need a solution that I can also deploy/include in a Windows Phone Series 7 application as well as one that will work in the browser environment - so managed code solutions only, I think?
In conversation, people have suggested Speex and WMA for instance, but I haven't found any libraries or examples that work without requiring reference to DLL's that won't work in a SL4 project.
Just a small addition to Jason's post:
There is another port of Speex to .Net and Silverlight 4 called NSpeex.
Please see the WavFileHelper class in Silverlight 4 Rough Notes: Camera and Microphone Support on Mike Taulty's blog (a bit lower than the middle of the page, but the full article is worthwhile) in which he compresses the PCM file to WAV.
Here's another example of when writing to WAV you can change values such as Mono/Stereo, which will directly change the size of the WAV file: Audio recorder Silverlight 4 sample. And one more that gives more details about writing to WAV: Creating Sound using MediaStreamSource in Silverlight 3 Beta
Take a look at this. It looks like he has ported the Speex encoder to C# for the exact problem you are trying to solve. It is available here. Speex is designed for speech and should perform better than wma, mp3, or other audio codecs that are designed to handle music if you are just encoding speech, which I assume since you are grabbing from the mic.
This article http://alvas.net/alvas.audio,articles.aspx#how-to-save-audio-to-mp3-on-silverlight about save audio on client. To send audio data to a server you can use WebClient, for example.
You can do encoding thru the server, by send all stream to WCF service and do your encoding thru Microsoft Expression Encoding SDK API.
Please, see this url that i have asked before:
http://forums.silverlight.net/forums/t/181141.aspx
Regards

Getting WM/Picture using C# and WM Encoder SDK

I was hoping someone could help point me in the right direction and/or provide a sample for me to look at. I need to get the WM/Picture field inside a WMA file that I decode using WM Encoder and C#. I have been able to get all the other tags fine, but media.getAttributeCountByType("WM/Picture", "") function always return 0. But Windows Media Player can display the picture correctly and I saw two hidden JPG files under the same music folder. MSDN don't provide much information about it. Thanks.
program chat voice with c#

Categories