-
Notifications
You must be signed in to change notification settings - Fork 60
Add autogenerated API for React Native ExecuTorch documentation #748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
470528b to
98ccf0b
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
packages/react-native-executorch/src/types/imageSegmentation.ts
Outdated
Show resolved
Hide resolved
chmjkb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| ```typescript | ||
| // Languages supported by whisper (Multilingual) | ||
| type SpeechToTextLanguage = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sidenote here: Maybe we shoiuld explain what each one of these represents? I feel like this might be confusing for new users (old users too)
| public delete(): void { | ||
| this.nativeModule.unload(); | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should just delete the number[] already? or agree on a timeline for deleting this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, I can remove all the deprecated signatures and add information about this in Breaking Changes section of this PR
| * Runs the decoder of the model. Passing number[] is deprecated. | ||
| * | ||
| * @param tokens - The input tokens. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here with the number param
| @@ -104,6 +142,14 @@ export class SpeechToTextModule { | |||
| return this.textDecoder.decode(new Uint8Array(transcriptionBytes)); | |||
| } | |||
|
|
|||
| /** | |||
| * Starts a streaming transcription session. | |||
| * Yields objects with `committed` and `nonCommitted` transcriptions. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should explain what that actually means
| /** | ||
| * Executes the model's forward pass, where `waveform` is a Float32Array representing the audio signal. | ||
| * | ||
| * @param waveform - The input audio waveform as a Float32Array. | ||
| * @returns A promise resolving to an array of detected speech segments. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be worth mentionign the sample rate here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely
|
Also, I got a couple of warnings: |
Co-authored-by: Jakub Chmura <[email protected]>
Co-authored-by: Jakub Chmura <[email protected]>

Description
This PR adds auto-generated API into documentation. This is based on typedoc comments in TypeScript code which are also added here. During creating this documentation I caught many smaller errors. They are fixed here as well.
Introduces a breaking change?
This PR remove constant for vertical OCR. All constants that started with
VERTICAL_OCR_*are now removed. From now, onlyOCR_*constants should be used for both OCR and vertical OCR.Type of change
Tested on
Testing instructions
cd docs & yarn & yarn build & yarn serve)Please do not review files in directory
06-api-reference, they are generated automatically.Also you don't need to check any
*.mdfiles manually, you can test them all by clicking through the built documentation ;)Screenshots
Related issues
#772
#752
#746
#612
#410
Checklist
Additional notes