Giter VIP home page Giter VIP logo

yokawasa / vscode-translator-voice Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 4.0 3.07 MB

VS Code extension for multi-language text translation and TTS (text-to-speech) using Azure Cognitive Services. Please [✩Star] if you're using it!

Home Page: https://marketplace.visualstudio.com/items?itemName=yokawasa.vscode-translator-voice

License: MIT License

TypeScript 100.00%
vscode vscode-extension vscode-translator-voice typescript translator tts neural-tts azure-cognitive-services voice speech

vscode-translator-voice's Introduction

vscode-translator-voice

This is a vscode extension for multi-language text translation and TTS (text-to-speech) using Azure Cognitive Services.

Very Important - In order to use this extension you must have a Azure Cognitive Services account with Translator Text and Speech Service resources. If you don't have it already, get one here

Features

  • Text Translation (using V3 Translator API of Azure Cognitive Services)
  • Text-to-speech (using neural TTS engine API of Azure Cognitive Services)
  • Multi-Language support (See this for the detail)

Requirements

You must have an Azure Cognitive Services account with a Translator Text and a Speech Services resources. If you don't have an account, please create:

Installation

  • Open the Command Palette of VS Code with Ctrl + P or Cmd + P(Mac)
  • And type: ext install yokawasa.vscode-translator-voice

or find at Marketplace

Usage

Configure Extension Settings

Please see Extension Settings

Select target text in your editor to translate

You need to select target text in your editor to translate. Without it, you can not execute the command.

Execute "TranslatorVoice: Translate" command

Execute TranslatorVoice: Translate command from command palette like this:

You can exectue the command with a shortcut key:CTL + Shift + T (Mac:Cmd + Shift + T) as well.

Then, translated text will be added to Output window like this:

Disable/Enable Voice feature

You can disable/enable Voice feature by (1) executing TranslatorVoice: Toggle Voice command from command palette, or (2) toggling statusBarItem named Voice [enabled/disabled] like this:

Extension Settings

Configure the extension settings through the contributes.configuration extension point.

The extension contributes the following settings:

  • translatorvoice.subKeyTranslator: Subscription Key for Cognitive Translator API
  • translatorvoice.subKeySpeech: Subscription Key for Cognitive Speech API
  • translatorvoice.regionSpeechApi : Region for Cognitive Speech API (ex, japaneast, eastus, ...). Please refer to this page for the detail of available region for the API
  • translatorvoice.targetLanguage: Target Language Code (en, fr, de, ja, zh-Hans,...). Please refer to this page for the detail of supported language code.
  • translatorvoice.defaultVoiceEnabled: Whether to enabled voice capability by default: true|false
  • translatorvoice.voiceGender: Default Gender for speaker (male|female)

First, open Settings editor from the following VS Code menu command or use the keyboard shortcut CTL + , (Mac: Cmd + ,).

  • On Windows/Linux - File > Preferences > Settings
  • On macOS - Code > Preferences > Settings

Then, choose Translator Voice Configuration in Extensions group in User settings, and finally update the settings options above.

Please see also this page for the detail of settings.

Commands & Shortcut

Command Shortcut Description
TranslatorVoice: Translate CTL + Shift + T
(Mac:Cmd + Shift + T)
Translate selected text in your editor. In addition, read the translated text with voice only if the voice feature is enabled.
TranslatorVoice: Toggle Voice NONE Disable/Enable Voice feature.

Change Log

See Change Log

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yokawasa/vscode-translator-voice

vscode-translator-voice's People

Contributors

dependabot[bot] avatar yokawasa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vscode-translator-voice's Issues

App doesn't catch up with configuration change without restart

Issue:

  • you add new value to parameters in App configuration setting page. For example, subscription keys for the api. But app doesn't send api request with new subscription key and turn out to be a failure

Goal:

  • App execute with new parameters value that user give without restart

Cannot get extension working - Am I using the wrong API Keys?

Hello Yokawasa,

Thank you for creating this cool VS Code Extension!
I am trying to use it however I only get the Translating your text: Target Language (en) message when running the TranslatorVoice: Translate command. This is of course even after inputting my API Subscription Keys.

Thus, I wanted to verify that I have correctly configured your Extension.

For Translatorvoice: Sub Key Translator, I am using Microsoft's Translator offered under Microsoft Azure's Marketplace. I followed How to sign up for Translator help doc

Toggled Voice state isn't persisted

Issue:
Even if you toggle voice state to disable it while you are editing and using the extension, it isn't persisted on the contribution configuration for the extension. If you down and up vscode and use it again, the extension read the voice state (enabled/disable) from the configuration.

Goal:
If you toggle voice state to disable or enable it while you are editing, it should be persisted on the contribution configuration for the extension.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.