Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
QuestionApertura de Archivos en C# ASP.Net interactuando con base de datos SQL Server Pin
Hernán Camilo21-Oct-20 8:50
professionalHernán Camilo21-Oct-20 8:50 
AnswerRe: Apertura de Archivos en C# ASP.Net interactuando con base de datos SQL Server Pin
BillWoodruff21-Oct-20 15:30
professionalBillWoodruff21-Oct-20 15:30 
QuestionGhost click mouse Pin
cloude8317-Oct-20 1:54
cloude8317-Oct-20 1:54 
AnswerRe: Ghost click mouse Pin
OriginalGriff17-Oct-20 2:16
mveOriginalGriff17-Oct-20 2:16 
GeneralRe: Ghost click mouse Pin
cloude8317-Oct-20 11:01
cloude8317-Oct-20 11:01 
AnswerRe: Ghost click mouse Pin
jsc4219-Oct-20 23:03
professionaljsc4219-Oct-20 23:03 
GeneralRe: Ghost click mouse Pin
trønderen20-Oct-20 5:54
trønderen20-Oct-20 5:54 
Questionhi im a bit stuck i followed this tut on youtube and its just not working can anyone help me plz i get error Pin
Marcus Riggs14-Oct-20 12:32
Marcus Riggs14-Oct-20 12:32 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Speech;
using System.Speech.Synthesis;
using System.Speech.Recognition;
using System.Threading;
using System.Diagnostics;

namespace PC_AI_BOT_2020
{

public partial class Form1 : Form
{

// form declarations...
SpeechSynthesizer ss = new SpeechSynthesizer();
PromptBuilder pb = new PromptBuilder();
SpeechRecognitionEngine sre = new SpeechRecognitionEngine();
Choices clist;


public Form1()
{
InitializeComponent();
}

private void Btnstart_Click(object sender, EventArgs e)
{
// start (button_click)
btnstart.Enabled = false;
btnstop.Enabled = true;

clist.Add(new string[] { "hello", "how are you", "what is the current time", "open crome", "thanks you", "close" });
Grammar gr = new Grammar(new GrammarBuilder(clist));

try
{
sre.RequestRecognizerUpdate();
sre.LoadGrammar(gr);
sre.SpeechRecognized += Sre_speechrecognized;
sre.SetInputToDefaultAudioDevice();
sre.RecognizeAsync(RecognizeMode.Multiple);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "error");
}


}

void Sre_speechrecognized(Object sender, SpeechRecognizedEventArgs e)
{
switch (e.Result.Text.ToString())
{
case "hello":
ss.SpeakAsync("hello marcus");
break;

case "how are you today":
ss.SpeakAsync("i am doing grate marcus how about you");
break;

case "wht is the current time":
ss.SpeakAsync("current time is " + DateTime.Now.ToLongTimeString
());
break;

case "thank you":
ss.SpeakAsync("pleasure is mine marcus");
break;

case "open crome":
Process.Start("crome", "http;//www.google.com");
break;

case "close":
Application.Exit();
break;

}
txtcontents.Text += e.Result.Text.ToString() + Environment.NewLine;
}

private void Btnstop_Click(object sender, EventArgs e)
{
// stop (button_click )
sre.RecognizeAsyncStop();
btnstart.Enabled = true;
btnstop.Enabled = false;
}
}

}


AnswerRe: hi im a bit stuck i followed this tut on youtube and its just not working can anyone help me plz i get error Pin
OriginalGriff14-Oct-20 20:23
mveOriginalGriff14-Oct-20 20:23 
QuestionRe: hi im a bit stuck i followed this tut on youtube and its just not working can anyone help me plz i get error Pin
ZurdoDev15-Oct-20 1:18
professionalZurdoDev15-Oct-20 1:18 
Questionwhat is better way to handle audit data in sequel server? Pin
ronak752113-Oct-20 2:54
ronak752113-Oct-20 2:54 
AnswerRe: what is better way to handle audit data in sequel server? Pin
OriginalGriff13-Oct-20 2:57
mveOriginalGriff13-Oct-20 2:57 
AnswerRe: what is better way to handle audit data in sequel server? Pin
ZurdoDev13-Oct-20 3:12
professionalZurdoDev13-Oct-20 3:12 
AnswerRe: what is better way to handle audit data in sequel server? Pin
Richard MacCutchan13-Oct-20 5:24
mveRichard MacCutchan13-Oct-20 5:24 
GeneralRe: what is better way to handle audit data in sequel server? Pin
ZurdoDev14-Oct-20 5:21
professionalZurdoDev14-Oct-20 5:21 
GeneralRe: what is better way to handle audit data in sequel server? Pin
Richard MacCutchan14-Oct-20 5:39
mveRichard MacCutchan14-Oct-20 5:39 
QuestionWhat kind of dll use ftp/sftp mapping drive? Pin
MinSeokKo12-Oct-20 22:48
MinSeokKo12-Oct-20 22:48 
AnswerRe: What kind of dll use ftp/sftp mapping drive? Pin
OriginalGriff13-Oct-20 1:54
mveOriginalGriff13-Oct-20 1:54 
GeneralRe: What kind of dll use ftp/sftp mapping drive? Pin
MinSeokKo13-Oct-20 14:11
MinSeokKo13-Oct-20 14:11 
GeneralRe: What kind of dll use ftp/sftp mapping drive? Pin
Randor 13-Oct-20 15:49
professional Randor 13-Oct-20 15:49 
GeneralRe: What kind of dll use ftp/sftp mapping drive? Pin
Dave Kreskowiak13-Oct-20 18:58
mveDave Kreskowiak13-Oct-20 18:58 
GeneralRe: What kind of dll use ftp/sftp mapping drive? Pin
Randor 13-Oct-20 19:39
professional Randor 13-Oct-20 19:39 
GeneralRe: What kind of dll use ftp/sftp mapping drive? Pin
Dave Kreskowiak14-Oct-20 5:01
mveDave Kreskowiak14-Oct-20 5:01 
JokeRe: What kind of dll use ftp/sftp mapping drive? Pin
Randor 14-Oct-20 9:22
professional Randor 14-Oct-20 9:22 
Questionhow to insert unknown amount of data into a database Pin
steven_noppe11-Oct-20 7:41
steven_noppe11-Oct-20 7:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.