Skip to content

Commit

Permalink
chore: update deps & docgen
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Nov 8, 2024
1 parent b8babc8 commit 7c6c6fc
Show file tree
Hide file tree
Showing 7 changed files with 503 additions and 473 deletions.
60 changes: 41 additions & 19 deletions docs/API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ whisper.rn
### Type Aliases

- [AudioSessionSettingIos](README.md#audiosessionsettingios)
- [BenchResult](README.md#benchresult)
- [ContextOptions](README.md#contextoptions)
- [TranscribeFileOptions](README.md#transcribefileoptions)
- [TranscribeNewSegmentsNativeEvent](README.md#transcribenewsegmentsnativeevent)
Expand Down Expand Up @@ -58,7 +59,28 @@ whisper.rn

#### Defined in

[index.ts:76](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L76)
[index.ts:76](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L76)

___

### BenchResult

Ƭ **BenchResult**: `Object`

#### Type declaration

| Name | Type |
| :------ | :------ |
| `config` | `string` |
| `nBatchd` | `number` |
| `nDecode` | `number` |
| `nEncode` | `number` |
| `nPrompt` | `number` |
| `nThreads` | `number` |

#### Defined in

[index.ts:177](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L177)

___

Expand All @@ -76,11 +98,12 @@ ___
| `filePath` | `string` \| `number` | - |
| `isBundleAsset?` | `boolean` | Is the file path a bundle asset for pure string filePath |
| `useCoreMLIos?` | `boolean` | Prefer to use Core ML model if exists. If set to false, even if the Core ML model exists, it will not be used. |
| `useFlashAttn?` | `boolean` | Use Flash Attention, only recommended if GPU available |
| `useGpu?` | `boolean` | Use GPU if available. Currently iOS only, if it's enabled, Core ML option will be ignored. |

#### Defined in

[index.ts:441](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L441)
[index.ts:456](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L456)

___

Expand All @@ -90,7 +113,7 @@ ___

#### Defined in

[index.ts:59](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L59)
[index.ts:59](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L59)

___

Expand All @@ -108,7 +131,7 @@ ___

#### Defined in

[index.ts:52](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L52)
[index.ts:52](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L52)

___

Expand All @@ -127,7 +150,7 @@ ___

#### Defined in

[index.ts:45](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L45)
[index.ts:45](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L45)

___

Expand All @@ -148,7 +171,6 @@ ___
| `maxThreads?` | `number` | Number of threads to use during computation (Default: 2 for 4-core devices, 4 for more cores) |
| `offset?` | `number` | Time offset in milliseconds |
| `prompt?` | `string` | Initial Prompt |
| `speedUp?` | `boolean` | Speed up audio by x2 (reduced accuracy) |
| `tdrzEnable?` | `boolean` | Enable tinydiarize (requires a tdrz model) |
| `temperature?` | `number` | Tnitial decoding temperature |
| `temperatureInc?` | `number` | - |
Expand All @@ -158,7 +180,7 @@ ___

#### Defined in

[NativeRNWhisper.ts:5](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/NativeRNWhisper.ts#L5)
[NativeRNWhisper.ts:5](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/NativeRNWhisper.ts#L5)

___

Expand All @@ -176,7 +198,7 @@ ___

#### Defined in

[index.ts:70](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L70)
[index.ts:70](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L70)

___

Expand All @@ -201,7 +223,7 @@ ___

#### Defined in

[index.ts:138](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L138)
[index.ts:138](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L138)

___

Expand All @@ -219,7 +241,7 @@ ___

#### Defined in

[index.ts:171](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L171)
[index.ts:171](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L171)

___

Expand All @@ -243,7 +265,7 @@ ___

#### Defined in

[index.ts:158](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L158)
[index.ts:158](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L158)

___

Expand All @@ -253,7 +275,7 @@ ___

#### Defined in

[index.ts:84](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L84)
[index.ts:84](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L84)

___

Expand All @@ -271,7 +293,7 @@ ___

#### Defined in

[NativeRNWhisper.ts:39](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/NativeRNWhisper.ts#L39)
[NativeRNWhisper.ts:37](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/NativeRNWhisper.ts#L37)

## Variables

Expand All @@ -296,7 +318,7 @@ AudioSession Utility, iOS only.

#### Defined in

[AudioSessionIos.ts:50](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L50)
[AudioSessionIos.ts:50](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L50)

___

Expand All @@ -308,7 +330,7 @@ Is allow fallback to CPU if load CoreML model failed

#### Defined in

[index.ts:543](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L543)
[index.ts:562](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L562)

___

Expand All @@ -320,7 +342,7 @@ Is use CoreML models on iOS

#### Defined in

[index.ts:540](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L540)
[index.ts:559](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L559)

___

Expand All @@ -332,7 +354,7 @@ Current version of whisper.cpp

#### Defined in

[index.ts:535](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L535)
[index.ts:554](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L554)

## Functions

Expand All @@ -352,7 +374,7 @@ Current version of whisper.cpp

#### Defined in

[index.ts:467](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L467)
[index.ts:484](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L484)

___

Expand All @@ -366,4 +388,4 @@ ___

#### Defined in

[index.ts:530](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L530)
[index.ts:549](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L549)
35 changes: 28 additions & 7 deletions docs/API/classes/WhisperContext.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

### Methods

- [bench](WhisperContext.md#bench)
- [release](WhisperContext.md#release)
- [transcribe](WhisperContext.md#transcribe)
- [transcribeRealtime](WhisperContext.md#transcriberealtime)
Expand All @@ -34,7 +35,7 @@

#### Defined in

[index.ts:195](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L195)
[index.ts:204](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L204)

## Properties

Expand All @@ -44,7 +45,7 @@

#### Defined in

[index.ts:191](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L191)
[index.ts:200](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L200)

___

Expand All @@ -54,7 +55,7 @@ ___

#### Defined in

[index.ts:189](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L189)
[index.ts:198](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L198)

___

Expand All @@ -64,10 +65,30 @@ ___

#### Defined in

[index.ts:193](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L193)
[index.ts:202](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L202)

## Methods

### bench

**bench**(`maxThreads`): `Promise`<[`BenchResult`](../README.md#benchresult)\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `maxThreads` | `number` |

#### Returns

`Promise`<[`BenchResult`](../README.md#benchresult)\>

#### Defined in

[index.ts:445](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L445)

___

### release

**release**(): `Promise`<`void`\>
Expand All @@ -78,7 +99,7 @@ ___

#### Defined in

[index.ts:436](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L436)
[index.ts:451](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L451)

___

Expand Down Expand Up @@ -106,7 +127,7 @@ Transcribe audio file

#### Defined in

[index.ts:206](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L206)
[index.ts:215](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L215)

___

Expand All @@ -128,4 +149,4 @@ Transcribe the microphone audio stream, the microphone user permission is requir

#### Defined in

[index.ts:302](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/index.ts#L302)
[index.ts:311](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/index.ts#L311)
12 changes: 6 additions & 6 deletions docs/API/enums/AudioSessionCategoryIos.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory?langua

#### Defined in

[AudioSessionIos.ts:8](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L8)
[AudioSessionIos.ts:8](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L8)

___

Expand All @@ -35,7 +35,7 @@ ___

#### Defined in

[AudioSessionIos.ts:13](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L13)
[AudioSessionIos.ts:13](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L13)

___

Expand All @@ -45,7 +45,7 @@ ___

#### Defined in

[AudioSessionIos.ts:12](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L12)
[AudioSessionIos.ts:12](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L12)

___

Expand All @@ -55,7 +55,7 @@ ___

#### Defined in

[AudioSessionIos.ts:10](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L10)
[AudioSessionIos.ts:10](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L10)

___

Expand All @@ -65,7 +65,7 @@ ___

#### Defined in

[AudioSessionIos.ts:11](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L11)
[AudioSessionIos.ts:11](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L11)

___

Expand All @@ -75,4 +75,4 @@ ___

#### Defined in

[AudioSessionIos.ts:9](https://github.com/mybigday/whisper.rn/blob/8f61e46/src/AudioSessionIos.ts#L9)
[AudioSessionIos.ts:9](https://github.com/mybigday/whisper.rn/blob/b8babc8/src/AudioSessionIos.ts#L9)
Loading

0 comments on commit 7c6c6fc

Please sign in to comment.