i've been working on a personal assistant project, so far its going great but i dont know how to make her do a google search.
here's what i've tried :
if (speech == "friday search google")
{
Friday.SpeakAsync("what are you searching for?");
//theoratically speaking the next line should be the problem, i need a string that
//starts recording audio so i can recall the recorded audio as the named string (search)
SpeechRecognitionEngine search = new SpeechRecognitionEngine(); // <-- this line
string url = "www.google.com/search?=q";
Process.Start(url + search);
}
or if im entirely wrong, i'd really appreciate some help into making it work.
thanks in advance everyone!
Related
I am wondering if there is any way to record whatever I say in full dictation. What I mean by that is for example if I have a program, recording whatever is being picked up by the microphone and writing that information to a .txt file. How can I make so the program doesn't just "guess" the sentences? Because I find that using dictations like this.
DictationGrammar spellingDictationGrammar = new DictationGrammar("grammar:dictation#spelling");
spellingDictationGrammar.Name = "spelling dictation";
spellingDictationGrammar.Enabled = true;
recEngine.LoadGrammar(spellingDictationGrammar);
//question dictation grammar
DictationGrammar customDictationGrammar = new DictationGrammar("grammar:dictation");
customDictationGrammar.Name = "question dictation";
customDictationGrammar.Enabled = true;
recEngine.LoadGrammar(customDictationGrammar);
Just guesses whatever is being said. It is not even near accurate. Is there anyway to add a dictation or go around so it gets somewhat close to accurate?
at Windows 10 there is a Music Feature(Pic Below):
So my Question is: How can I access this information with C# and which libraries do i need?
Thanks for helping
Excuse me for my ignorance, but if I am correct, this widget is a pop up of Spotify, isn't this? In that case, you only have to check the MainWindowsTitle of spotify process.
var spotify = Process.GetProcessesByName("Spotify");
foreach (var song in spotify)
{
Console.WriteLine(song.MainWindowTitle);
}
Console.ReadLine();
Don't forget use using System.Diagnostics;. You will have to check if you don't get any song.
I was checking if this method works yet :)
How do I embed a youtube video into my C# project?
I've looked at so many others that "answer" this question but, I can't find what I'm looking for.
I've tried many different ways to embed them but, they don't work.
I'm looking to use a web browser to just play the video but, with two options: loop and pause/play.
Reason I'm doing this is because I'm making a twitch chat bot and I'm trying to add song requests.
Latest attempt (because it was there so I decided on trying it out):
bool MUrlSpecify = true;
private void btnMSetCurrent_Click(object sender, EventArgs e)
{
const string page = "<html><head><title></title></head><body>{0}</body></html>";
string YTUrl;
if(MUrlSpecify == true)
{
YTUrl = "https://www.youtube.com/embed/" + txtMSetCurrent.Text;
wbMPlayer.DocumentText = string.Format(page, "");
}
}
(MUrlSpecify is a variable I added because later I'm going to have a search function)
If anyone can tell me how I should do this I'll try their method because I'm all
out of ideas.
Try to use webbrowser.NavigateToString("player code");
Get the code from share button in youtube. Work perfectly.
Example: wb.NavigateToString("<iframe width=\"420\" height=\"315\" src=\"https://www.youtube.com/embed/dSrozYNxAA4\" frameborder=\"0\" allowfullscreen></iframe>");
I want to scan QR code in windows phone app 8.1.I am tried lot of examples but no one is work for me.
Below code I tried but no use
xmlns:jwqr="clr-namespace:JeffWilcox.Controls;assembly=JeffWilcox.Controls.QR"
in xaml
<jwqr:QRCodeScanner
ScanComplete="QRCodeScanner_ScanComplete"
Error="QRCodeScanner_Error"
Width="400"
Height="400"/>
It showing error like:
The name "QRCodeScanner" does not exist in the namespace
"clr-namespace:JeffWilcox.Controls;assembly=JeffWilcox.Controls.QR"
And tried the link this one also not working for me. But in this camera not scan the code. Please anyone help me. If you have any other links. I am trying this last 3 days but till now I am not getting any answer correctly. Plase help me.......
I'm not recommending but i've used Zxing Library for Barcode/QR code scanning and that worked for me.
here's a sample how to use this library:
// create a barcode reader instance
IBarcodeReader reader = new BarcodeReader();
// load a bitmap
var barcodeBitmap = (Bitmap)Bitmap.LoadFrom("C:\\sample-barcode-image.png");
// detect and decode the barcode inside the bitmap
var result = reader.Decode(barcodeBitmap);
// do something with the result
if (result != null)
{
txtDecoderType.Text = result.BarcodeFormat.ToString();
txtDecoderContent.Text = result.Text;
}
Documentation and other demoClient is available here
Ask if you require more code. Hope that helps..!
I want to write a simple Windows app in Visual C#/C++ that lets users input different segments of text, and then press a set of hotkeys to hear the various text segments in TTS at any time. The program should accept hotkeys while running in background or even when fullscreen applications have focus.
Example use case: user enters "hello world" and saves it as the first text segment, and then enters "stack overflow" and saves it as the second text segment. The user can switch to another program, then press hotkey CTRL-1 to hear the TTS say "hello world" or CTRL-2 to hear the TTS say "stack overflow." The program should of course be able to run entirely offline (just in case that affects any suggestions)
As a sidenote, I'm fairly new to programming in Visual whatever, but have a decent enough background in C#/C+, so even though I'm mainly looking for help on the TTS part, I'm open to suggestions of any kind if someone's done this kind of thing before.
if you want to talk something on C# use Introp.SpeechLib.dll
E.g:
private void ReadText()
{
int iCounter = 0;
while (Convert.ToInt32(numericUpDown1.Value) > iCounter)
{
SpVoice spVoice = new SpVoice();
spVoice.Speak("Hello World", SpeechVoiceSpeakFlags.SVSFPurgeBeforeSpeak);
spVoice.WaitUntilDone(Timeout.Infinite);
iCounter = iCounter + 1;
}
}
read this: Speech Technologies
Reference System.Speech.dll. You can instantiate a System.Speech.Synthesis.Synthesizer and call .Speak("TEXT HERE");
You have to use the Microsoft Speech SDK.
Have a look at this link for details:
http://dhavalshah.wordpress.com/2008/09/16/text-to-speech-in-c/