Question on Speech Recognition classes in .NET - c#

Is it possible to have an application built using the .NET speech recognition classes and pass in a WAV file for it to go through and create a text representation of it. For example, this what I'm trying to do:
We have a QA department at my office and they have to listen to hundreds of calls a day which is quite impossible, and there's not enough people listening to everything to keep up. What I want to do is have the audio file uploaded to our server and have the server parse it and create a transcript of it. It doesn't matter if it's not perfect, but just a base which would be easier to skim through a couple of dozen lines of text than listen to a 2 hour recording.
Based on a saved transcript I can implement full-text search in the database and also run checks against the transcript if someone is saying something that's a misrepresentation.
So, is it possible to create an application using the .NET speech recognition classes and just pass the WAV file to it and it spit out a rough transcript?
I've dug around MSDN on the Speech classes briefly while thinking up the idea, so I don't have that much knowledge if it's possible to be done.
If possible, I would appreciate any examples in C#. Topic 1055347 is similar to the question I'm having, and was provided links, the most specific of which is in C++. I'm not a C++ developer, nor have I ever went to school for programming, I'm all self though C#, so I would like to stay in the language that I know.
Thanks in advance!

This sounds like you've got a call center type of application. Microsoft Speech Server has a SR engine optimized for telephony (8000 Hz sample rate), which will generate much better recognitions than the desktop SR engine. However, the engine isn't really designed for transcription (although it can do it), and the transcriptions definitely need to be reviewed before further processing occurs. Microsoft Exchange Unified Communications uses the SR engine to generate transcripts of voice mail, and while it's better than nothing, it often generates amusing nonsense.

With areas like speech recognition you are likely to either find a stand alone EXE or an API in c/c++.
For the links in the other topic, you can use a tool like P Interop Assistant to generate C# code. The C# code acts like a wrapper around the unmanaged dll, so you can call it from c#.
This is likely to be the best way to get the functionality you are looking for.

Yes.
I did such an application a few years ago on the Tablet PC; you can read about it at http://web.archive.org/web/20060615192119/www.devx.com/TabletPC/Article/30761 (At the time, I spoke of using Interop to access the libraries, but I believe that the programming model has remained the same, just with a managed wrapper.)
At the time, the results were very poor, but maybe for your use-case better than nothing.

How about route the calls to Google Voice? I'm sure there are similar services. I have been amazed at its accuracy so far, plus you can click and listen to it if required. Google Voice will forward voice calls to SMS or email.
UPDATE: On reread, maybe since you are recording calls it won't work as I yous the voice message left.

Related

.NET BarCode Reader in WPF

I am trying to see whether its possible to read the barcode in WPF Applications without using any 3rd party tools. We built an application using WPF and they are not willing to buy any third party devices to read the barcode. Is there any other way to read the barcode data in WPF Applications using .NET APIS?
Note: I seen examples in .NET, but most of them using Barcode reader tool. I have seen examples in Android ZXing library does that with out any tools like barcode reader or scanner.
Any ideas or thoughts is greatly appreciated.
Thanks,
Ramesh
In order to shorten the discussion in comments and possibly help other people with similar problem, I will summarize it here.
It is not clear to me whether the real question you wanted to ask is "does .NET provide barcode reader class". If so, the answer is no.
Now, since WPF application is just a normal .NET application, for sure it is possible to implement barcode reading without 3rd party libraries. All the algorithms are public, there is plenty of open source implementation which can serve as reference, and .NET provides all you need to talk to the peripherals, acquire the image and analyze it. You "just" need to code it.
E.g. there is a C# port of ZXing, so you can take a look (though it looks like automatic translation from Java, so I wouldn't expect much idiomatic C# in there).
You also mention that your customers "are not willing to buy any third party devices". I am not sure if 'devices' was meant to read 'libraries'. If so, there are open source libraries which they (or you) don't have to pay, and commercial components usually provide royalty free licenses (e.g. the first one that google showed), which means that only you have to pay the development license, but your customer doesn't even know about it.

Using agsXMPP , can it send images?

I found this lib here
http://www.ag-software.de/agsxmpp-sdk/
hacked on this example here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=346
It works pretty well actually but I am wondering if one could rig up a message thats an image that would show up in the others (google talk client) or some other client for display? I poked around on the web, couldn't figure out definitively if this is possible...their site says the api supports XML-RPC, could that do it?
Just want to know im not going down a dead end for this functionality...if XMPP jabber even supports it.
This library seems not to support XEP 0231, the specification that "defines an XMPP protocol extension for including or referring to small bits of binary data in an XML stanza."

I need to find a good BSD Licensed C# SIP Softphone

I currently have written an API to a SIP phone system, and would like to integrate a full on SIP softphone into what I already have.
I'm looking to integrate an open source softphone that:
includes a full featured SIP stack
is written in C#, or easily integrable into a C# application
is BSD or similarly licensed
exposes basic features (dialing, transferring, holding, etc) in a fairly high level way (i.e. it would be easy to just write a UI for it and viola I have a custom softphone)
My goal is to make a proof of concept softphone quickly to be able to demo. I'd take a completely built softphone that was BSD if I could just rewrite the C# front end.
Thanks and I look forward to the invariably useful feedback.
As far as I know there isn't an open source C# softphone out there. My own SIP stack is C# and open source but it's used for a SIP application server and is missing chunks of functionality needed for a softphone such as an RTP implementation, codecs, audio device interop etc.
The closest thing I know of that may suit your needs is sipek voip (I'm pretty sure that used to be called pjsip.net) which is a C# wrapper on the pjsip open source SIP and media libraries which are themselves written in C and licensed under GPL; so pjsip doesn't meet your licensing requirement even if you were prepared to use the wrapper library.
The most efficient path for you may be to look around the existing softphones out there and find one that offers skinning services. IN this question which is similar to yours it sounds like the developer is using zoiper. I know counterpath also offer skinning but it's not cheap. Of course if you've got a few months of developer resources sitting idle I'm sure you could build on my or soeon
We are using the mizu webphone. It is not written in C# but it says that it is cross platform so i think that you should be able to use it with C# as well (we are using it from ASP .NET)

What's a good API for recording/capturing and playing back sound in Delphi and/or C#?

<flavor> I want to create a spelling test program for my grade schoolers that would let them enter and record their spelling words then test them on them through out the week.</flavor>
What's a good Delphi API with which I could select a recording device, capture and save sound files, then play them back?
I'm also toying with doing the same project in C#, so C# Sound capture/playback API recommendations would also be appreciated.
An alternative to recording would be to use the MS Speech API with C#, enter the words via keyboard, and have it state what was keyed in.
Just a thought... Good luck on your app -- it sounds like a really cool program!
I've found New Audio Components to be quite good for Delphi.
This component set looks promising though I've never used it myself. AudioLab 3.1 has both VCL components as well .NET 2.0 components which should allow you to use it whether you stay with developing your application in Delphi or move to C#. Finally, it appears to be Free for non-commercial use.
The best place to look for Delphi Components
(Audio)
http://www.torry.net/pages.php?id=167
Why not use the TMediaPlayer that comes with Delphi (in the System Tab of the Palette)?
It can record and play wave files very easily
I was also going to suggest AudioLab.

Printing from a .NET Service [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am working on a project right now that involves receiving a message from another application, formatting the contents of that message, and sending it to a printer. The technology of choice is C# windows service. The output could be called a report, I suppose, but a reporting engine is not necessary. A simple templating engine, like StringTemplate, or even XSLT outputting HTML would be fine. The problem I'm having is finding a free way to print this kind of output from a service. Since it seems that it will work, I'm working on a prototype using Microsoft's RDLC, populating a local report and then rendering it as an image to a memory stream, which I will then print. Issues with that are:
Multi-page printing will be a big headache.
Still have to use PrintDocument to print the memory stream, which is unsupported in a Windows Service (though it may work - haven't gotten that far with the prototype yet)
If the data coming across changes, I have to change the dataset and the class that the data is being deserialized into. bad bad bad.
Has anyone had to do anything remotely like this? Any advice? I already posted a question about printing HTML without user input, and after wasting about 3 days on that, I have come to the conclusion that it cannot be done, at least not with any freely available tool.
All help is appreciated.
EDIT: We are on version 2.0 of the .NET framework.
Trust me, you will spend more money trying to search/develop a solution for this as compared to buying a third party component. Do not reinvent the wheel and go for the paid solution.
Printing is a complex problem and I would love to see the day when better framework support is added for this.
Printing from a Windows service is really painful. It seems to work... sometimes... but finally it craches or throws an exception from time to time, without any clear reason. It's really hopeless. Officially, it's even not supported, without any explanation, nor any proposal for an alternate solution.
Recently, I have been confronted to the problem and after several unsuccessful trials and experimentations, I came finally with two viable solutions:
Write your own printing DLL using the Win32 API (in C/C++ for instance), then use it from your service with P/Invoke (works fine)
Write your own printing COM+ component, then uses it from your service. I have chosen this solution with success recently (but it was third party COM+ component, not own written) It works absolutely fine too.
I've done it. It's a pain in the A*s. The problem is that printing requires that GDI engine to be in place, which normally means that you have to have the desktop, which only loads when you're logged in. If you're attempting to do this from a Service on a Server, then you normally aren't logged in.
So first you can't run as the normal service user, but instead as a real user that has interactive login rights. Then you have to tweak the service registry entries (I forget how at the moment, would have to find the code which I can do tonight if you're really interested). Finally, you have to pray.
Your biggest long term headache will be with print drivers. If you are running as a service without a logged in user, some print drivers like to pop up dialogs from time to time. What happens when your printer is out of toner? Or out of paper? The driver may pop up a dialog that will never be seen, and hold up the printer queue because nobody is logged in!
To answer your first question, this can be fairly straight forward depending on the data. We have a variety of Service-based applications that do exactly what you are asking. Typically, we parse the incoming file and wrap our own Postscript or PCL around it. If you layout is fairly simple, then there are some very basic PCL codes you can wrap it with to provide the font/print layup you want (I'd be more then happy to give you some guidance here offline).
One you have a print ready file you can send it to a UNC printer that is shared, directly to a locally installed printer, or even to the IP of the device (RAW or LPR type data).
If, however, you are going down the PDF path, the simplest method is to send the PDF output to a printer that supports direct PDF printing (many do now). In this case you just send the PDF to the device and away it prints.
The other option is to launch Ghostscript which should be free for your needs (check the licensing as they have a few different version, some GNU, some GPL etc.) and either use it's built in print function or simply convert to Postscript and send to the device. I've used Ghostscript many times in Service apps but not a huge fan as you will basically be shelling out and executing a command line app to do the conversion. That being said, it's a stable app that does tend to fail gracefully
Printing from a service is a bad idea. Network printers are connected "per-user". You can mark the service to be run as a particular user, but I'd consider that a bad security practice. You might be able to connect to a local printer, but I'd still hesitate before going this route.
The best option is to have the service store the data and have a user-launched application do the printing by asking the service for the data. Or a common location that the data is stored, like a database.
If you need to have the data printed as regular intervals, setup a Task event thru the Task Scheduler. Launching a process from a service will require knowing the user name and password, which again is bad security practice.
As for the printing itself, use a third-party tool to generate the report will be the easiest.
This may not be what you're looking for, but if I needed to do this quick&dirty, I would:
Create a separate WPF application (so I could use the built-in document handling)
Give the service the ability to interact with the desktop (note that you don't actually have to show anything on the desktop, or be logged in for this to work)
Have the service run the application, and give it the data to print.
You could probably also jigger this to print from a web browser that you run from the service (though I'd recommend building your own shell IE, rather than using a full browser).
For a more detailed (also free) solution, your best bet is probably to manually format the document yourself (using GDI+ to do the layout for you). This is tedious, error prone, time consuming, and wastes a lot of paper during development, but also gives you the most control over what's going to the printer.
If you can output to post script some printers will print anything that gets FTPed to a certain directory on them.
We used this to get past the print credits that our university exposed on us, but if your service outputs to a ps then you can just ftp the ps file to the printer.
We are using DevExpress' XtraReports to print from a service without any problems. Their report model is similar to that of Windows Forms, so you could dynamically insert text elements and then issue the print command.
I think we are going to go the third party route. I like the XSL -> HTML -> PDF -> Printer flow... Winnovative's HTML to PDF looks good for the first part, but I'm running into a block finding a good PDF printing solution... any suggestions? Ideally the license would be on a developer basis, not on a deployed runtime basis.
In answer to your question about PDF printing, I have not found an elegant solution. I was "shell" ing out to Adobe which was unreliable and required a user to be logged in at all times. To fix this specific problem, I requested that the files we process (invoices) be formatted as multi-page Tiff files instead which can be split apart and printed using native .NET printing functions. Adobe's position seems to be "get the user to view the file in Adobe Reader and they can click print". Useless.
I am still keen to find a good way of producing quality reports which can be output from the web server...
Printing using System.Drawing.Printing is not supported by MS, as per Yann Trevin's response. However, you might be able to use the new, WPF-based, System.Printing (I think)

Categories