A Chrome extension that uses Neuphonic to read aloud highlighted text, or allows users to converse with a page using Neuphonic Agents.
- Node.js
- pnpm
- Chrome browser
-
Clone the repository:
git clone git@github.com:neuphonic/neuphonic-chrome-extension.git cd neuphonic-chrome-extension -
Install dependencies:
pnpm install
-
Build the extension:
pnpm build
This creates a
/buildfolder with the compiled extension.Alternatively, for development:
pnpm dev
This starts a watch mode that rebuilds the extension on file changes.
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer Mode" (toggle in the top right)
- Click "Load Unpacked"
- Select the
/buildfolder from your project directory
See Hello World Tutorial for details on how to develop with chrome extensions.
- The extension will be loaded into Chrome and ready to use
- Any changes made to the source code will require a re-build.
- Therefore, when developing, use
pnpm devto handle the building. The changes automatically become available in the widget.
- Click the extension icon in Chrome's toolbar
- If it's your first time:
- Go to Settings
- Add your Neuphonic API key
- Select your preferred language and voice
- To use Read Aloud:
- Highlight any text on a webpage
- Click the extension icon
- Click "Read Aloud"
- The text will be read aloud using your selected voice
neuphonic-chrome-extension/
├── src/ # Source code
│ ├── App.tsx # Main application component
│ ├── hooks.ts # Custom React hooks
| ├── content.ts # Custom script which runs in the context of the browser
│ └── types.ts # TypeScript type definitions
├── public/ # Static assets
│ ├── manifest.json # Extension manifest
│ └── logo.png # Neuphonic logo
└── build/ # Compiled extension (generated)