|
hi! m doing a project in c#. if i say 'D drive' it opns my d drive if i say 'notes' it opns the folder notes from d drive.(i have add the 'D drive' and 'notes' in gramer)
but i want to make gramer general i mean if it is in som other pc and should knw what is all in D drive(Drive can b change i use it for my convenient). and what ever the user say it should opn it. how can i make grammer general. one solution is whnever i run the program it should load the contents of D drive. but how? any other solution?
hope it is clear.
|
|
|
|
|
Good luck. There is a huge amount of effort by very intelligent people to work on voice recognition systems.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I just want to second what Mark Nischalke said in his post.
If you are working on voice recognition, this is hard. If you want to use the built-in libraries (such as those that come with Windows 7) then processing the requests with a general grammer is also hard
By hard I mean its the sort of thing requires a team of researchers. To my knowledge no one has got natural languge processing right yet, even the voice recoginition libraries aren't 100%.
|
|
|
|
|
You're talking about a natural speech interface between the user and the computer, like Hal in 2001. You can't afford the hardware, and the software just ain't possible right now. the closest we've come is that Wizard computer that played jeopardy last week, and it was purpose-built to play jeopardy, and do nothing else.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
hmm thn is it possible to control the volum of VLC player or media player by voice command in c#?
means if i say 'increase the volum' volum should b increascd.. or vice versa..
|
|
|
|
|
You haven't been listening, now have you...
You just changed the application requirement, the problem is still very much the same.
|
|
|
|
|
Dave Kreskowiak wrote: You haven't been listening, now have you...
Of course he hasn't, that's the problem; speach recognition
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
aeman wrote: but how? any other solution?
You'd first need a dictionary of words that get recognized, and no, even the hardcore speech-dictation solutions only recognize the words that it knows.
If it was easy, it would be standard functionality. It's neither.
I are Troll
|
|
|
|
|
Don't listen to all the people saying how hard it is, and how you'll never do it.
The iPhone is a good example of this working - it understands a limited range of commands but does make an attempt at recognising names of bands, albums and artists.
e.g. you can say "Play Beatles" - the "Play" is predefined but (one imagines) the "Beatles" is generically algorithmised. (yes, I made up that word)
I think you are right in your idea - here's how I would think about the approach.
Assuming you are looking at a disc. Collect the names of all the top level folders and files, and process the names to sylabalise them (e.g. encode them into a series of syllables) in a similar way to SoundEx.
Then when a command is issued by the user (say, "Open Fred") you first match the command "Open" which is fixed, then compare the sound "Fred" against all of the folders/files previously encoded. And choose the closest match.
Good luck.
And when you have it developed, commercially released, and are rolling in the money, don't forget to come back here and post an "I told you so" message
___________________________________________
.\\axxx
(That's an 'M')
|
|
|
|
|
thanks for the hope. i did som work. it now load all the directories of my drive and opn that one which one i say. like if i say 'd drive' it opn it thn whaterever directory is say in D drive it opns that. but only folders.now m trying to control the other files like .doc, .mp3 ets. hope i will do this soon.
and i dont bother -ve things from others i only get +ve. once my project will complete i will defiantly post here. for others help.
|
|
|
|
|
can i get the code for your project
|
|
|
|
|
Hi guys,
I have explained my probs here..,
this problem is occuring in IE browser only...,Mozila its working fine...,
Plz click on the following url in IE browser
http://www.justtrade.in/Portfoliotracker/Default.aspx[^]
U will see "Registered User" link plz click tht one..., u will get a login page, with out changing the browser url...,becoz its opening in an iframe...,
so, the login page also in an iframe...,
here if i am trying to login a user...,if the user is authenticated...,
i am using his user name as session...,and redirecting him to home page...,
but, if the valid user login also, its redirecting him to login page only...,
this problem in IE browser only...,Mozila its working fine...,
can u plz tell me y its not working in IE? and how to solve this one?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
Could you please explain what this has to do with C#? It looks to me that it would be better in the Web Development forum.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Hi,
I have to display an message to the user when he is uploading a file through File Upload,
In clear, if the file he is uploading is open in his desktop, at that time only i need to display this message like "Close the File Before upload" or etc, if the file he is uploading he is not open in his machine, it has to upload without throwing any message..
The code am used for file uploading is like this...
private void BtnBrowseClick(object sender, RoutedEventArgs e)
{
OpenFileDialog file1 = new OpenFileDialog { Multiselect = false, Filter = "Text File|*.txt" };
if (file1.ShowDialog() == true)
{
new FileInfo(file1.FileName);
using (Stream s = file1.OpenFile())
{
TextReader reader = new StreamReader(s);
reader.ReadToEnd();
txtFileName.Text = file1.FileName;
txtFileName.IsEnabled = false;
}
}
}
So in this code, i have to display an message, in case the file he is uploading is open in his machine, so the file uploading is not possible in that case..
So could u tell me how can i do this...
|
|
|
|
|
you first would have to define "open". is it "open" at the functional level (like Notepad or Word is showing the text content), or is it the state the file has from File.Open() to File.Close()?
In the former case, it may or may not be doable. Notepad reads an entire text file and closes it while you can edit it (Proof: open a .txt file and try and delete it while you can edit it in Notepad); Word OTOH keeps the file locked, so you can't delete it while editing.
In the latter case, a File.Delete() would fail. So you could do this:
- make a copy of the file;
- try and delete the original;
- if that succeeds, it was not in use, and you should rename the copy to the original;
- if it fails, the file was not entirely free (either in use, locked, write-protected, ...).
Conclusion: there is no general solution.
Remark: if the upload and the edit could be combined in a single app, then of course that app would know what it is doing, so it could prohibit an upload while editing.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Can't that be done simpler? E.g. with the open method of FileInfo class
fi.Open(FileMode.Open, FileAccess.Read, FileShare.None);
That should cause an exception when the file is in use by Word (of course no chance with Notepad).
modified on Wednesday, February 23, 2011 2:50 AM
|
|
|
|
|
No in my Application, i can upload only a file of type *.txt or *.csv,
so could u tell me how can i display a message to the user, when he is uploading a file of (.txt or .csv)type only when that particular file is open in his machine..
As of now in my application, it makes the application crash if that uploading file is open in user machine..
please check my code here..
private void BtnBrowseClick(object sender, RoutedEventArgs e)
{
OpenFileDialog file1 = new OpenFileDialog { Multiselect = false, Filter = "All Supported Files |*.txt;*.csv|Text|*.txt|CSV |*.csv"};
if (file1.ShowDialog() == true)
{
new FileInfo(file1.FileName);
try
{
using (Stream str = file1.OpenFile())
{
TextReader reader = new StreamReader(str);
reader.ReadToEnd();
txtFileName.Text = file1.FileName;
txtFileName.IsEnabled = false;
}
}
catch
{
txtFileName.Text = file1.FileName;
txtFileName.IsEnabled = false;
MessageBox.Show("Please check the file has been Closed before you upload", "LRM..! Manual Feed File Upload");
}
}
}
It is showing warning message if i change the security of that file,but it i think that is not a right way..
So could u tell me the solution, if it needed ignore my code and tell me with a new sample of code..
modified on Wednesday, February 23, 2011 6:03 AM
|
|
|
|
|
Hi all, I have an MDI container app with several MDI children forms that can be open at any one time. I had a problem, which I think I've solved fairly elegantly, but which introduced a new problem. Maybe someone here can make suggestions.
The original problem:
Changes on one MDI child form could affect the contents of another MDI child form. So what I did was to have each MDI form implement an interface with a RefreshForm() function. Each MDI child form will the override this function in which the data on the form is repopulated. Whenever a form submits changes to the data source (ie. changes that might affect the contents of any other form, it calls a function which iterates through all the open MDI children forms on the app and calls the RefreshForm() function for each.
The new problem:
The new problem is that, if a user was still busy editing data on Form A , switches to Form B to make changes there without submitting the changes he was busy making to Form A and then submitting the changes he made to Form B , you can already guess what happens. Form A gets repopulated and all unsaved changes are lost. No way around this, at least not that I can think of.
So I was thinking I can override the Deactivate event handler for these forms and warn the user that changes have been made and that these may be lost. I'd like, however, to provide an "OK" and "Cancel" button on the MessageBox , so that the "Cancel" button will take the user right back to the form he was busy editing. But how?
If, in the Deactivate event handler I show a MessageBox and call FormA.Focus() if the user clicks "Cancel", for some reason the newly selected form still has focus as opposed to Form A .
Any advice?
|
|
|
|
|
I do believe you are finding out why MDI is not a popular format! I would add an IsEditing flag to the MDI form and refuse to update that form if it is edit mode!
Sooner or later managing all the different states and interactions of a complex MDI app will cause it to crawl up it's own bum and dissapear.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well said that man. Maintaining an MDI App of any size is excruciating.
|
|
|
|
|
Thanks, not a bad suggestion. I think I'll do that, and also check whether any of the form's data in the data source has changed and if so, display a big red warning on the form that the data has changed and this form cannot be saved anymore - or something like that.
I'm surprised to hear you saying that MDI is not a popular format. What would be a popular format then for something like say a CRM applications? Say for instance, you're looking at the details of a customer and then, without having to close that customer and later opening it again, you want to see a list of orders that customer has placed. And then, without having to close that list of orders and later opening it again, you want to see the shipping details for a particular order.
MDI just seemed to me like the perfect format for this kind of application (and of course it brings with it all sorts of extra challenges). But I'd be interested to know what a more appropriate format would be.
|
|
|
|
|
It's not that MDI does not do the job, it is excellent for what you describe, however the management of MDI can be extremely challenging. In 20+ years of windows development I have only worked on 1 MDI app and have resisted the temptation ever since.
I think MS had a number of MDI apps in the late 90s and moved back to SDI, this also strongly influenced the SDI trend.
I am more restrictive and only allow modal dialogs, I often get the complaint that the user wants additional dialogs open at the same time, this I will sometimes do but they are only allowed to work 1 dialog/window at a time.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks, I'll keep that in mind for future projects. Who knows, maybe this is is that one MDI app that I will have developed after which I will resist the temptation Come to think of it, I have actually developed a MDI app before and it was bad.
I'd have to be honest though that I don't really agree with the argument that "you stay away from MDI because it's hard to implement", I'd be much more susceptible to the argument "you stay away from MDI because the user finds it confusing or difficult" and I'm not really sure if that is the case. Especially if you say that you often get the complaint that users want additional dialogs open at the same time.
Isn't that a bit like a car manufacturer saying "we don't have cruise control on our vehicles because it is difficult to implement"? If that is what the user want then that is what the developer needs to do, whether it's easy or not.
Imagine Microsoft Excel telling you, no sorry you can only work on one workbook at a time So, while Excel these days provide you with an option to view all open work books as separate instances of Excel or as different SDI children of a larger MDI application, I consider both to be some type of MDI - viz. multiple documents are open at the same time, all of which can be edited at the same time and any of which may or may not affect data on any of the other.
|
|
|
|
|
I don't stay away from MDI just b/c they are difficult to manage, and I don't dissallow my users from seeing multiple windows of information. I don't use MDI b/c I think SDI is a better solution, that solution is made up of many aspects, among them usability, time to deliver and ease of support.
Support is the biggest cost of any applcation, MDI complicates support - dramtically, especially if the IP for the app is lost when the developer moves on (I'm a contractor to corporates)
You also cannot let users run riot with requirements, as a senior architect part of my job is to reign in some of the more fanciful requests from the users. I still have an outstanding requirement for a Minority Report UI (based on Kinect maybe).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
LOL. Minority Report UI based on Kinect, that is too funny! I've had some outlandish requests from users but this one takes the biscuit.
|
|
|
|
|