

- Microsoft translator with voice for free#
- Microsoft translator with voice how to#
- Microsoft translator with voice install#
For information about continuous recognition for longer audio, including multi-lingual conversations, see How to translate speech. This example uses the RecognizeOnceAsync operation to transcribe utterances of up to 30 seconds, or until silence is detected.Now that you've completed the quickstart, here are some additional considerations: TRANSLATED into 'it': Sono entusiasta di provare la traduzione vocale.

RECOGNIZED: Text=I'm excited to try speech translation. What you speak should be output as translated text in the target language: Speak into your microphone. Speak into your microphone when prompted. Run your new console application to start speech recognition from a microphone: dotnet run The default language is en if you don't specify a language. For example, use es for Spanish (Spain) instead of es-ES. With few exceptions you only specify the language code that precedes the locale dash ( -) separator. To change the translation target language, replace it with another supported language. For details about how to identify one of multiple languages that might be spoken, see language identification. The default language is en-US if you don't specify a language. Specify the full locale with a dash ( -) separator. To change the speech recognition language, replace en-US with another supported language. See the Cognitive Services security article for more information. For production, use a secure way of storing and accessing your credentials like Azure Key Vault. Remember to remove the key from your code when you're done, and never post it publicly. In Program.cs, replace YourSubscriptionKey with your Speech resource key, and replace YourServiceRegion with your Speech resource region. OutputSpeechRecognitionResult(translationRecognitionResult) Var translationRecognitionResult = await translationRecognizer.RecognizeOnceAsync() Using var translationRecognizer = new TranslationRecognizer(speechTranslationConfig, audioConfig) Ĭonsole.WriteLine("Speak into your microphone.")

Using var audioConfig = AudioConfig.FromDefaultMicrophoneInput() SpeechTranslationConfig.AddTargetLanguage("it") SpeechTranslationConfig.SpeechRecognitionLanguage = "en-US" Var speechTranslationConfig = SpeechTranslationConfig.FromSubscription(YourSubscriptionKey, YourServiceRegion) Switch (translationRecognitionResult.Reason)Ĭonsole.WriteLine($"RECOGNIZED: Text=") Ĭonsole.WriteLine($"CANCELED: Did you set the speech resource key and region values?") Static void OutputSpeechRecognitionResult(TranslationRecognitionResult translationRecognitionResult) Static string YourServiceRegion = "YourServiceRegion" Static string YourSubscriptionKey = "YourSubscriptionKey" Replace the contents of Program.cs with the following code.
Microsoft translator with voice install#
Install the Speech SDK in your new project with the. Open a command prompt where you want the new project, and create a console application with the. Translate speech from a microphoneįollow these steps to create a new console application and install the Speech SDK. You install the Speech SDK later in this guide, but first check the SDK installation guide for any more requirements. The Speech SDK is available as a NuGet package and implements. For more information about Cognitive Services resources, see Get the keys for your resource. After your Speech resource is deployed, select Go to resource to view and manage keys.
Microsoft translator with voice for free#
Azure subscription - Create one for free.
