Code Monkey home page Code Monkey logo

screanswer's Introduction

Screanswer

Screanswer is a command line tool designed to provide a convenient way of answering text on the screen for macOS users. It is an easy-to-use tool that can be used for a variety of purposes, such as searching sentences or terms, copying texts to the clipboard, and more.

screanswer

Features

Screanswer is designed to be fast, efficient, and user-friendly. It includes the following features:

  • Capturing text on the screen and copying it to the clipboard
  • Answering the text on the screen automatically using ChatGPT
  • Reading the output aloud in a system voice

Installation

Homebrew

You can install Screanswer using brew:

brew tap rai62/screanswer
brew install screanswer

Go install

Alternatively, you can install Screanswer using go install:

go install github.com/rai62/screanswer@latest

Usage

Before using Screanswer, you need to set up the following environment settings for ChatGPT and GCP.

Setting up ChatGPT API Key for Answering Text

To enable text answering functionality, register your API key for ChatGPT in the environment variable CHATGPT_API_KEY.

export CHATGPT_API_KEY=your_api_key

Setting up GCP for Image-to-Text and Text-to-Speech

To enable image-to-text and text-to-speech functionality, create a GCP project and enable the following APIs:

Please refer to the official documentation for more information. You only need to complete the Create a project and Enable the API sections.

After setting up GCP, register your credentials for GCP in the environment variable GOOGLE_APPLICATION_CREDENTIALS. Please see the official documentation.

export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json

Commands

Here are some commands to use Screanswer:

  • To capture, answer, and read text on the screen: screanswer
  • To capture and copy text on the screen: screanswer capture
  • To get an answer to text: screanswer answer <text>
  • To read text aloud: screanswer speak <languageCode> <text>

Examples

Here are some examples of how to use Screanswer:

  • To capture, answer, and read text on the screen:
screanswer

This will capture text on the screen, answer it using ChatGPT, and then read the answer aloud in a system voice.

  • To capture and copy text on the screen:
screanswer capture

This will capture text on the screen and copy it to the clipboard.

  • To get an answer to text:
screanswer answer 'What is the capital of France?'

This will answer the specified text using ChatGPT and print the answer to the terminal.

  • To read text aloud:
screanswer speak en-US 'Hello, world!'

This will read the specified text "Hello, world!" in English using a system voice.

Supported Languages (Language Codes)

Screanswer currently supports the following languages:

  • English (en-US)
  • Japanese (ja-JP)

screanswer's People

Contributors

rai62 avatar dependabot[bot] avatar

Stargazers

PoMomo avatar Nikita Zhenev avatar

Watchers

Kostas Georgiou avatar  avatar

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.