Skip to content

Commit 25d2ec0

Browse files
update docs with clipboard
1 parent c85b78b commit 25d2ec0

File tree

3 files changed

+31
-54
lines changed

3 files changed

+31
-54
lines changed

README.md

+15-27
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class VoiceCaptureExampleComponent {
4444

4545
<voicecapture-angular
4646
[start]="isVoiceCaptureExample"
47+
[clipboard]="true"
4748
(voiceTranscript)="returnVoiceTranscript($event)"
4849
/>
4950

@@ -58,7 +59,6 @@ export class VoiceCaptureExampleComponent {
5859
placeholder="Texto do Voice Transcript"
5960
/>
6061

61-
<label for="voiceTextArea" >Textarea Example:</label>
6262
<textarea
6363
id="voiceTextArea"
6464
[(ngModel)]="voiceTextTranscript"
@@ -73,44 +73,32 @@ export class VoiceCaptureExampleComponent {
7373

7474
## Component Setup
7575

76-
In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoiceCaptureExample` is defined, initialized to `false`. The `openVoiceCapture` method sets `isVoiceCaptureExample` to `true`, which triggers the voice capture process.
76+
In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoiceCaptureExample` is defined and initialized to `false`. The `openVoiceCapture` method sets `isVoiceCaptureExample` to `true`, triggering the voice capture process. The `enableClipboard` property is used to enable clipboard integration.
7777

7878
## Inputs
7979

80-
### @Input() start: WritableSignal<boolean>
80+
| Input | Type | Default | Description |
81+
|-------------|-----------------------|-------------|----------------------------------------------------------------------------------------------|
82+
| `start` | `WritableSignal<boolean>` | `false` | Controls the initiation of voice capture. |
83+
| `lang` | `string` | `"en"` | Specifies the language for speech recognition (e.g., `"pt"` for Portuguese). |
84+
| `mode` | `string` | `"fullscreen"` | Defines the display mode: `"float"` for inline, `"fullscreen"` for full-screen. |
85+
| `clipboard` | `boolean` | `false` | Enables copying the final transcript text to the clipboard automatically. |
8186

82-
Controls the initiation of voice capture.
83-
84-
### @Input() lang: string = 'en'
85-
86-
Language of voice capture, this default is en.
87-
88-
### @Input() mode: string = 'fullscreen'
89-
90-
Mode of voice capture, this default is `fullscreen` other value `float`.
91-
92-
**Example**: Start capturing voice input.
87+
### Example with Clipboard:
9388

9489
```html
95-
<voicecapture-angular [start]="isVoiceCaptureExample" />
90+
<voicecapture-angular [start]="isVoiceCaptureExample" [clipboard]="true" />
9691
```
9792

98-
### Outputs
99-
100-
### (voiceTranscript)
93+
## Outputs
10194

102-
An event that emits the transcribed voice input.
103-
104-
**Example**: Capture and use the transcribed text.
105-
106-
```typescript
107-
returnVoiceTranscript(transcript: string) {
108-
this.voiceTextTranscript = transcript;
109-
}
110-
```
95+
| Output | Payload | Description |
96+
|---------------------|-------------|-------------------------------------------------------------------------------------------------|
97+
| `voiceTranscript` | `string` | Emitted with the transcribed voice input. |
11198

11299
## Features
113100

114101
- **Real-time Voice Transcription**: Instantly capture and display voice input as text.
115102
- **Editable Transcripts**: Users can modify the transcribed text through input fields or text areas.
103+
- **Clipboard Integration**: Automatically copies the final transcript to the clipboard, streamlining user workflows.
116104
- **Customizable Events**: Easily handle transcription results with customizable output events.

projects/voicecapture-angular/README.md

+15-27
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class VoiceCaptureExampleComponent {
4444

4545
<voicecapture-angular
4646
[start]="isVoiceCaptureExample"
47+
[clipboard]="true"
4748
(voiceTranscript)="returnVoiceTranscript($event)"
4849
/>
4950

@@ -58,7 +59,6 @@ export class VoiceCaptureExampleComponent {
5859
placeholder="Texto do Voice Transcript"
5960
/>
6061

61-
<label for="voiceTextArea" >Textarea Example:</label>
6262
<textarea
6363
id="voiceTextArea"
6464
[(ngModel)]="voiceTextTranscript"
@@ -73,44 +73,32 @@ export class VoiceCaptureExampleComponent {
7373

7474
## Component Setup
7575

76-
In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoiceCaptureExample` is defined, initialized to `false`. The `openVoiceCapture` method sets `isVoiceCaptureExample` to `true`, which triggers the voice capture process.
76+
In the `VoiceCaptureExampleComponent`, a `WritableSignal<boolean>` named `isVoiceCaptureExample` is defined and initialized to `false`. The `openVoiceCapture` method sets `isVoiceCaptureExample` to `true`, triggering the voice capture process. The `enableClipboard` property is used to enable clipboard integration.
7777

7878
## Inputs
7979

80-
### @Input() start: WritableSignal<boolean>
80+
| Input | Type | Default | Description |
81+
|-------------|-----------------------|-------------|----------------------------------------------------------------------------------------------|
82+
| `start` | `WritableSignal<boolean>` | `false` | Controls the initiation of voice capture. |
83+
| `lang` | `string` | `"en"` | Specifies the language for speech recognition (e.g., `"pt"` for Portuguese). |
84+
| `mode` | `string` | `"fullscreen"` | Defines the display mode: `"float"` for inline, `"fullscreen"` for full-screen. |
85+
| `clipboard` | `boolean` | `false` | Enables copying the final transcript text to the clipboard automatically. |
8186

82-
Controls the initiation of voice capture.
83-
84-
### @Input() lang: string = 'en'
85-
86-
Language of voice capture, this default is en.
87-
88-
### @Input() mode: string = 'fullscreen'
89-
90-
Mode of voice capture, this default is `fullscreen` other value `float`.
91-
92-
**Example**: Start capturing voice input.
87+
### Example with Clipboard:
9388

9489
```html
95-
<voicecapture-angular [start]="isVoiceCaptureExample" />
90+
<voicecapture-angular [start]="isVoiceCaptureExample" [clipboard]="true" />
9691
```
9792

98-
### Outputs
99-
100-
### (voiceTranscript)
93+
## Outputs
10194

102-
An event that emits the transcribed voice input.
103-
104-
**Example**: Capture and use the transcribed text.
105-
106-
```typescript
107-
returnVoiceTranscript(transcript: string) {
108-
this.voiceTextTranscript = transcript;
109-
}
110-
```
95+
| Output | Payload | Description |
96+
|---------------------|-------------|-------------------------------------------------------------------------------------------------|
97+
| `voiceTranscript` | `string` | Emitted with the transcribed voice input. |
11198

11299
## Features
113100

114101
- **Real-time Voice Transcription**: Instantly capture and display voice input as text.
115102
- **Editable Transcripts**: Users can modify the transcribed text through input fields or text areas.
103+
- **Clipboard Integration**: Automatically copies the final transcript to the clipboard, streamlining user workflows.
116104
- **Customizable Events**: Easily handle transcription results with customizable output events.

src/app/app.example.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { VoiceCapture } from 'voicecapture-angular';
1313
1414
<voicecapture-angular
1515
[start]="isVoiceState"
16+
[clipboard]="true"
1617
(voiceTranscript)="voiceTranscript($event)"
1718
/>
1819

0 commit comments

Comments
 (0)