Convert microphone recording to string in Windows Phone 8 - c#

Background info
I am trying to convert a microphone recording to a string.
So far I have been following this sample from MSDN website to create a program that allows me to record with the microphone and play it back. Below is the link.
http://msdn.microsoft.com/en-us/library/windows/apps/gg442302%28v=vs.105%29.aspx
Sadly, I have not found any way how I can convert recording to string.
Question How do I convert the microphone recording to string?
I have tried to use Speech Recognition Engine but unfortunately the namespace System.Speech cannot be used in Windows Phone 8 sdk.

You want Windows.Phone.Speech for speech recognition, not System.Speech. An overview is here.

Related

Speech Recognizer Offline Capability Windows Phone 8.1

Is it possible to create a grammar file for speech recognition and use SpeechRecognizer offline, like Cortana?
I only found Speech.Recognizer examples... it seems like Recognizer can use SpeechRecognitionEngine.loadGrammar(). I wonder if something similar is possible on a Windows Phone?
Is it possible to use SpeechRecognizer offline with a grammar File? Or is it possible to use Cortana's ability to recognize Speech To Text offline?

Set webbrowser audio to stream to media player so it can be used in background on windows phone 8

I am making a netradio app on windows phone, my problem is that netradio uses the RTSP audio format and native media player in Windows Phone does not support RTSP.
As a workaround, I have to navigate to a webpage that then handles the audio.
This works fine, and plays the radio, but the problem is that as soon as the app is put in the background the music stops.
Is there a way to keep the webbrowser audio playing?
You could use the BackgroundAudioPlayer within your solution as another project where you could go through a sample here.
And also the sample from Codeplex you can try the Windows Phone Streaming Media.
https://phonesm.codeplex.com/
Hope it helps!
There is no native RTSP support with BackgroundAudioPlayer. You would need to make your own MediaStreamSource implementation to be able to use the stream. At least I didn't find any public 3rd party solutions. Check this http://social.msdn.microsoft.com/Forums/sqlserver/en-US/e052ea29-53cf-4ebb-8558-742b67fc72ad/rtsp-support-in-wp8.
If you are up for the task of writing your own MediaStreamSource implementation, you can use this as starting point and study the RTSP protocol here.

How to Capture PCM data from microphone in Windows Metro Apps Uinsg C#

Any one help me how to capture pcm data from microphone in windows metro app using C#.
You need to write a C++ component that uses WASAPI, as far as I'm aware this can't be done in only C#.
There's a great working example here:
http://www.codeproject.com/Articles/525620/Recording-audio-to-WAV-with-WASAPI-in-Windows-Stor
The source code for the article is hard to find so here's a link:
http://www.codeproject.com/KB/audio-video/525620/RecordingWavFilesWithWasapiInWindowsRT.zip
I have previously used this in my C# app to allow people to pause their audio recordings.

Windows 8 Metro record audio (filter noise, change pitch)

Is it possible to record audio only when there is someone talking? I want to listen to the microphone and only start recording when the "volume" is greater than some noise level (meaning someone is talking) I also need to change the pitch of the recorded audio.
I tried MediaCapture class in C# but StartRecordToStorageFileAsync from a sample is not useable in my scenario. In Windows Phone I use XNA but I cannot find a similiar API in Windows 8.
Check this thread on MSDN forums: How to get the decibel with C#?
It seems like there is and probably will not be APIs for doing that in C#, Visual Basic or JavaScript and you need to do it in a native component.
The Core Audio/WASAPI APIs from the article mentioned in that thread should have what you need: Win32 and COM for Metro style apps (multimedia)
I think this document has a description of a sample for capturing audio from a Kinect sensor that might have relevant code samples showing how you would use GetBuffer() calls to get the buffer of raw audio samples that you could process to get the information you need.

How do you change the audio device in using System.Speech.Synthesis

I'm trying to use System.Speech.Synthesis to play text that is then output over a tapi modem.
SetOutputToDefaultAudioDevice() is easy enough to figure out, but I don't want the sound to come out of the speakers.
I think i need to use SetOutputToAudioStream, but I'm not sure how to use it and I can't find any examples ...
I tried changing the default device in the control panel, but that didn't work either :(
Insight anyone?
Thanks
Have you looked at the answers here? It has a brief example.
Also - if your modem supports TAPI, you should review the samples in the Windows SDK, in particular, the Simple Telephony sample in %windowssdkdir%\Samples\winui\speech\simpletelephony. This is written in C++, but it demonstrates how to get the audio device ID for the modem and to set the device ID for SAPI's audio stream.
You can change output of text to speech in control panel->speech recognition->text to speech->advanced. Then select "Use this audio output device" and select audio device to output text to speech.

Categories