The Text Tone Changer Chrome extension allows users to change the tone of selected text in webpages. With this extension, you can easily rephrase text to match different tones such as "Formal," "Casual," or "Friendly," making it useful for various communication scenarios.
The primary objective of this project is to build a Chrome extension that enables users to rewrite selected text in different tones. By using OpenAI's GPT3.5 model, the extension performs tone analysis and text rewriting to provide rephrased versions of the selected text based on the user's chosen tone.
- Select text on a webpage and open the extension to see the selected text in the input field.
- Choose a tone from the available options: "Formal," "Casual," or "Friendly."
- The extension uses OpenAI's GPT3.5 model to analyze the tone and generate a rephrased version of the text in the selected tone.
- The user can reset the text input to clear the selected text.
- The user can save the rephrased text to the clipboard for easy copying and pasting.
- Clone this repository to your local machine.
- Install the required Python dependencies using
pip install -r backend/requirements.txt
. - Replace
"YOUR_BACKEND_URL"
infrontend/js/background.js
with the actual URL of your Flask backend server. - Set up an account with OpenAI and obtain an API key to access the GPT3.5 model.
- Use the API key in the
rephrase_text
function inbackend/app.py
to interact with the GPT3.5 model for tone analysis and text rewriting.
-
Load the extension in Google Chrome:
- Open Google Chrome and go to
chrome://extensions/
. - Enable "Developer mode" in the top right corner.
- Click on "Load unpacked" and select the project folder containing the
manifest.json
file.
- Open Google Chrome and go to
-
Use the Text Tone Changer extension:
- Visit any webpage and select the text you want to rephrase.
- Click on the Text Tone Changer extension icon in the Chrome toolbar to open the popup.
- The selected text will be displayed in the input field.
- Choose the desired tone ("Formal," "Casual," or "Friendly") using the buttons in the popup.
- The rephrased text will be displayed in the input field based on the chosen tone.
- Click "Reset" to clear the text input and select new text for rephrasing.
- Click "Save to Clipboard" to copy the rephrased text to your clipboard.
This project is for educational and experimental purposes. The accuracy and performance of the tone analysis and text rewriting heavily depend on the GPT3.5 model and its usage. OpenAI's API may have usage limitations and costs associated with it.
- This project was inspired by the need for a convenient way to rephrase text with different tones in online communication.
- We thank OpenAI for providing access to the powerful GPT3.5 model, enabling the implementation of this extension.
This project is licensed under the MIT License.