|
i will make a new software
but can i anyway make a code when i make in my speak a longer brake, he shot place a point, if i say make a new line the application schould write in a new line
|
|
|
|
|
Sure you can, but I think, for your initial prototype, you should consider trying to use specific commands, rather than looking for pauses of greater than a certain length to trigger an action. I'd choose some special word to serve as a "trigger:" to indicate that the word that follows the trigger is parsed as a "command."
For example: trigger : "Parse"
Parse return // append period followed by cr/lf pair
Parse newline // append cr/lf pair
Start by getting oriented about the speech-recognition library Microsoft provides: [^].
The good news for you is that CodeProject has many excellent articles that will help you get started with your application: [^].
And, don't forget to read the tutorials by Microsoft on speech-recognition.
Once you have your project in progress, as you have specific problems, or questions, do come back here (or use the QA forum) to post your questions including selected pieces of your code directly related to the issue/problem.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
I suggest you to read about "Project Oxford" from Microsoft. It exposes web API for speech recognition and supports NLU
|
|
|
|
|
How do you be gritty in c # webbrowser to support Windows Media Player
|
|
|
|
|
Eh? What do you mean by gritty? I'm sorry but your question makes no sense in this form.
|
|
|
|
|
First, is this WinForms, WPF, ASP.NET ?
"True Grits" starts when you put your fingers on the computer keyboard and search CodeProject, the web, and StackOverFlow.
First, you must deal with the question of whether grits can be found and used in the way you describe. You might run into a problem like the one described here: [^], where the versions of Windows and/or WMP are incompatible.
Once you know that grits is available, you harvest the raw grits by reading the relevant links in your search results, and/or studying relevant code you discover in the links.
For the raw grits to be useful, it needs to get ripe. So you create a WinForms or WPF project, you put a web-browser control on it, you do what it takes to get the Windows Media Player object loaded (an HTML file opened) in that WebBrowser control, and the right connections made to a valid media source, and the play command issues.
... and you ask specific question here describing any problem(s) you are having, showing the relevant code in your project as necessary.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
modified 1-Nov-15 4:06am.
|
|
|
|
|
BillWoodruff wrote: For the raw grit to be useful, it needs to get ripe.
Unfortunately, raw grit is like supermarket fruit: you can wait forever for it to ripen to luscious edibility only to find that 30 seconds later it has gone off and is inedible...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Well, OG, down in the American south where I came from, grit, as in grits, is an all-white meal/flour made from maize (boiled corn) that has about zero nutritional value, and is pretty much tasteless, which is why it's probably so popular as part of breakfast. Almost all American grits nowadays is made from alkali treated corn (i.e., technically it's a form of hominy).
Grits is the official prepared food of the state of Georgia in the U.S.
Typically served with loads of butter, salt, pepper, increasing its value in promoting heart-attack, stroke, obesity, arterial congestion, etc. It is often deep-fried into patties in oil (preferably slightly rancid left-over bacon-grease) to round out its toxicity with some saturated-fats.
I suspect you English boys think of grit in terms of nail-files, sand-paper, or macadam, or some other esoteric use.
It is true, for American grits, that if they are not in a tightly sealed container they will get infested with something insectoid pronto.
cheers, Bill
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
BillWoodruff wrote: I suspect you English boys think of grit in terms of nail-files, sand-paper, or macadam, or some other esoteric use.
Personally, I think of grit as lightly grated John Wayne...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
helo friends any one who have knowledge about ocr . i want to ask what is the latest ocr library ... or api or sdk.. m some confused. and wanna make latest ocr based software in c#
|
|
|
|
|
Please don't post the same thing repeatedly: I deleted the "spare" in this forum, but you also have a copy in QA. All you will do is duplicate work and annoy people. Pick either the C# forum or QA and stick with it.
Annoyed people are less likely to be helpful than happy ones...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
hi,
i have this code for reading xml file into my list.
var zfullname, zphone_M, zphone_F, zMail, zFname,zLname;
var ALL;
var Fname, Lname, Phone_M, Phone_F, Mail;
function XX() {
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
}
else {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET", "Phone.xml", false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
$("#ZIZI").empty();
var x = xmlDoc.getElementsByTagName("MEN");
for (i = 0; i < x.length; i++) {
try { Fname = x[i].getElementsByTagName("Fname")[0].childNodes[0].nodeValue; }
catch (err) { Fname = "0"; }
try { Lname = x[i].getElementsByTagName("Lname")[0].childNodes[0].nodeValue; }
catch (err) { Lname = "0"; }
try { Phone_M = x[i].getElementsByTagName("Phone_M")[0].childNodes[0].nodeValue; }
catch (err) { Phone_M = "0"; }
try { Phone_F = x[i].getElementsByTagName("Phone_F")[0].childNodes[0].nodeValue; }
catch (err) { Phone_F = "0"; }
try { Mail = x[i].getElementsByTagName("Mail")[0].childNodes[0].nodeValue; }
catch (err) { Mail = "0"; }
if (Mail == "0") Mail = " ";
if (Phone_M == "0") Phone_M = " ";
if (Phone_F == "0") Phone_F = " ";
ALL =
'<li >' +
'<a href="men.html" data-transition="flip">' +
'<div class="ui-grid-a" id="restau_infos"> ' +
'<p style="font-size:22px; margin:0px;padding:0px;" class="nam"><b>' + Fname + " " + Lname + '</b></p>' +
'<p style="font-size:16px; margin:0px;padding:0px;" class="phn">' + Phone_M + '</p>' +
'<p style="font-size:16px; margin:0px;padding:0px;" class="phn2">' + Phone_F + '</p>' +
'<p style="font-size:14px; margin:1px;padding:1px;" class="crr">' + Mail + '</p>' +
' </div>' +
'</a>' +
'<a href="tel:' + Phone_M + ' data-icon="location" ></a>' +
'</li>'
$("#ZIZI").append(ALL);
$("#ZIZI").listview("refresh");
}
}
this work excellent.
i have WebService that return DataSet.
string SQL;
DataSet dsView;
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Xml)]
public DataSet GetData( string sel)
{
dsView = new DataSet();
MyParam.OpenConnection();
SQL = "select Fname,Lname,S_phone from MEN where sel = '" + sel + "'";
dsView = new DataSet();
MyParam.adp = new SqlDataAdapter(SQL, MyParam.Conn);
MyParam.adp.Fill(dsView, "MEN");
MyParam.adp.Dispose();
if (dsView.Tables["MEN"].Rows.Count >= 1)
{
return dsView;
}
else
{
return null;
}
}
How to combine both that i can read from the WebService ?
(the WebService in 127.0.0.1/WS_TEST/Service1.asmx for example)
thanks
|
|
|
|
|
|
|
Why would this question be c# related?
|
|
|
|
|
You'll probably need a newer version of the Management Studio. Download one of the recent Express editions for free.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I am somewhat beginning with threads, and I am wondering if following class is thread safe? Or in which cases it is thread safe? The idea is users should be able to initialize this class once, second time initialization should not work if deinitialization was not called. But getting the properties should give correct results... and here I am having hard time to determine in which case those properties will get correct results, and if init and deinit methods are thread safe, as well as isInited method. Help appreciated. I tried make it immutable also.
static class Parameters
{
private static int x1;
private static int x2;
private static bool isInit;
private static readonly object Locker = new object();
public static bool isInited()
{
lock(Locker)
{
return isInit;
}
}
public static int X1()
{
if(!isInited()) throw new Exception("init first");
return x1;
}
public static int X2()
{
lock(Locker)
{
if(!isInited()) throw new Exception("init first");
return x2;
}
}
public static void init(int x, int y)
{
lock(Locker)
{
if(isInit) return;
isInit = true;
x1 = x;
x2 = y;
}
}
public static void Deinit()
{
lock(Locker)
{
if(!isInit) return;
isInit = false;
x1 = 0;
x2 = 0;
}
}
}
Or the client - user of this class has to take additional means to ensure this class is used in thread safe manner? Feedback appreciated
modified 30-Oct-15 16:23pm.
|
|
|
|
|
I believe what you are after is the Singleton design-pattern.
In addition to several articles on the Singleton design-pattern you can find here on CodeProject, there is a very useful analysis of different approaches by Jon Skeet (the C# uber-guru) here: [^] that covers issues of locking (thread safety), lazy initializtion, etc.
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
thank you but
1) you can see I am passing parameters to init method - those singletons on Jon Skeets article don't mention Singletons where you can pass parameters during init
2) I need a deinit method - users should be able to clear the Parameter class object, and set new properties if desired, again using method like init for example - since properties I have deliberately made read only
3) Can you show me sample how to achieve this using singleton?
modified 30-Oct-15 17:14pm.
|
|
|
|
|
Member 12061600 wrote: 2) I need a deinit method - users should be able to clear the Parameter class object, and set new properties if desired, again using method like init for example - since properties I have deliberately made read only
No you don't. At least, your deinit() does not need to be public anyway. When your init() method is called, you know if you're already initialized (thus, deinit() first, then re-init).
Member 12061600 wrote: 3) Can you show me sample how to achieve this using singleton?
I'm sure you can figure it out on your own. That's how you learn
Best,
John
|
|
|
|
|
yeah but users of this class might need deinit to reinitialize the class
|
|
|
|
|
I will reiterate:
When your init() method is called, inside your init() function, you know if you're already initialized (thus, deinit() first, then re-init).
Best,
John
|
|
|
|
|
deinit has to be public
otherwise if someone calls init twice it will reinitialize automatically on second call - if I follow that approach you mention, is it thread safe?
|
|
|
|
|
|