Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Oct 25, 2024
1 parent 75ba55c commit ac12fa9
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VoiceCapture Component

The `VoiceCapture` component is a React-based audio capture and transcription tool that leverages the browser's `SpeechRecognition` API. It provides an interactive UI to start, stop, and manage voice recognition, supporting multiple languages and display modes. Additionally, the component can be easily integrated with frameworks like `NucleusReact`.
The `VoiceCapture` component is a React-based audio capture and transcription tool that leverages the browser's `SpeechRecognition` API. It provides an interactive UI to start, stop, and manage voice recognition, supporting multiple languages and display modes. Additionally.

## Table of Contents
- [Installation](#installation)
Expand All @@ -13,7 +13,7 @@ The `VoiceCapture` component is a React-based audio capture and transcription to
Install the component:

```bash
npm install your-package-name
npm install voicecapture-react
```

## Usage
Expand Down Expand Up @@ -50,14 +50,11 @@ const MyComponent = () => {

## Example

Below is an example using `VoiceCapture` with `NucleusReact` and additional controls for language selection and display mode.
Below is an example using `VoiceCapture` and additional controls for language selection and display mode.

```jsx
import { useState } from "react";
import VoiceCapture from "voicecapture-react";
import NucleusReact from "nucleus-react-js";
import { configApp } from "./App.config";
import "./App.scss";

function App() {
const [start, setStart] = useState(false);
Expand All @@ -79,18 +76,18 @@ function App() {
};

return (
<NucleusReact config={configApp}>
<>
<VoiceCapture
start={start}
lang={lang}
mode={mode}
onVoiceTranscript={handleVoiceTranscript}
onDeactivate={handleDeactivate}
/>
<div className="content example">
<div>
<h2>VoiceCapture Example</h2>

<div className="content-actions">
<div>
<button onClick={() => openVoiceCapture("fullscreen")}>Fullscreen Mode</button>
<button onClick={() => openVoiceCapture("float")}>Float Mode</button>

Expand All @@ -112,7 +109,7 @@ function App() {
<textarea readOnly value={transcript} placeholder="Voice transcript will appear here..." />
</div>
)}
</NucleusReact>
</>
);
}

Expand Down

0 comments on commit ac12fa9

Please sign in to comment.