Skip to content

8ta4/accent

Repository files navigation

accent

Accentuate the Negative

What is accent?

accent is a tool to identify mispronunciations.

Cost

What's the cost?

While accent itself is free to use, it does depend on the Deepgram API and the OpenAI API, which might have their own charges.

  • Deepgram: This app uses Deepgram's speech-to-text Nova 2 model. You get charged based on the total duration of speech processed. Since both your speech and the reference speech are evaluated, you can estimate the cost as twice the duration of your spoken input. For specific rates, check out Deepgram Pricing.

  • OpenAI: For converting text to speech, this app uses OpenAI's standard text-to-speech model. You get charged based on the amount of text converted to speech. For specific rates, check out OpenAI Pricing.

Setup

How do you set up accent?

  1. Make sure you're using a Mac.

  2. Install devenv.

  3. Install direnv.

  4. Open a terminal window.

  5. Run the following commands:

    git clone https://github.com/8ta4/accent
    cd accent
    direnv allow
    build
    mkdir -p ~/.config/accent
  6. Open ~/.config/accent/config.yaml.

  7. Copy a Deepgram API key from the Deepgram website.

  8. Add the following field to the config.yaml file, replacing your_deepgram_api_key with your actual Deepgram API key:

    deepgram: your_deepgram_api_key
  9. Copy an OpenAI API key from the OpenAI website.

  10. Add the following field to the config.yaml file, replacing your_openai_api_key with your actual OpenAI API key:

    openai: your_openai_api_key
  11. Save the config.yaml file.

Usage

How do I check how my pronunciation's doing?

  1. Open a terminal on your computer.

  2. Navigate to the directory where accent is installed.

  3. Run the command accent to start the application.

  4. If asked, allow accent to access your mic.

  5. Start speaking.

  6. Press Space when you want to evaluate your pronunciation up to that moment.

How do I evaluate my pronunciation the second time?

After your initial evaluation, simply continue speaking and press Space whenever you want feedback on the new segment of speech you've just spoken. Each press of Space evaluates only the speech from the end of the last evaluation to the moment you press the key again.

How can I clear any inputs that haven't been evaluated yet?

Press Escape to clear any inputs that haven't been evaluated yet.

If accessing Escape is inconvenient, consider remapping another key to work as Escape.

How do I play the reference speech?

Press f. This will stop any currently playing speech and start playing the reference speech from the highlighted word.

How do I play back my speech?

Press d. This will stop any currently playing speech and start playing the user's speech from the highlighted word.

How do I stop playback?

Press Esc to stop any playback.

How do I move the highlight to the next word?

Press l to move the highlight to the next word. This is inspired by the Vim command for moving the cursor right.

How do I move the highlight to the previous word?

Press h to move the highlight to the previous word. This is inspired by the Vim command for moving the cursor left.

How do I move the highlight to the last word of the line?

Press $ to move the highlight to the last word of the line. This is inspired by the Vim command for moving the cursor to the end of the line.

How do I move the highlight to the first word of the line?

Press 0 to move the highlight to the first word of the line. This is inspired by the Vim command for moving the cursor to the beginning of the line.

What language does accent support?

Right now, accent only works with English.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published