Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Speech To Text by Microfone #193

Closed
ergunbilgehan opened this issue Mar 2, 2017 · 2 comments
Closed

Google Speech To Text by Microfone #193

ergunbilgehan opened this issue Mar 2, 2017 · 2 comments
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@ergunbilgehan
Copy link

I am working on Google Speech by c # . I want to use the microphone . My code is there But My code uses only audio files. Please help me . Thank you

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Google.Cloud.Speech.V1Beta1;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var speech = SpeechClient.Create();
var response = speech.SyncRecognize(new RecognitionConfig()
{
LanguageCode = "tr-TR",
Encoding = RecognitionConfig.Types.AudioEncoding.Linear16,
SampleRate = 16000,
}, RecognitionAudio.FromFile("audio.wav"));
foreach (var result in response.Results)
{
foreach (var alternative in result.Alternatives)
{
Console.WriteLine(alternative.Transcript);
} }
Console.ReadLine();
}}}

@SurferJeffAtGoogle
Copy link
Contributor

Have you tried to build and run this sample?
https://github.com/GoogleCloudPlatform/dotnet-docs-samples/tree/master/speech/api/Recognize

@ergunbilgehan
Copy link
Author

Thank you for the help. Now I need to I will convert this code to windows form.

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants