Skip to content

Conversation

@msluszniak
Copy link
Member

@msluszniak msluszniak commented Jan 22, 2026

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?

  • Yes
  • No

This PR remove constant for vertical OCR. All constants that started with VERTICAL_OCR_* are now removed. From now, only OCR_* constants should be used for both OCR and vertical OCR.

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  • Build documentation from this PR (cd docs & yarn & yarn build & yarn serve)
  • Check if API of our library is visible in the sidebar to the left (at the very bottom of it)
  • Then, Scan through the all API Reference and check if all the sections are correctly filled
  • Check if in the sections with Hooks and TypeScript API all the hand written tables with signatures etc. are removed, now API Reference is a source of truth. You should also check that the links the these section redirects to correct sections. The link themselves are correct (checked in building process), just the site where they pointing might be incorrect.
  • Check other changed sections of documentation for correctness
  • Check all the files with code that were changed if the changes are correct.

Please do not review files in directory 06-api-reference, they are generated automatically.
Also you don't need to check any *.md files manually, you can test them all by clicking through the built documentation ;)

Screenshots

Related issues

#772
#752
#746
#612
#410

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@msluszniak msluszniak self-assigned this Jan 22, 2026
@msluszniak msluszniak added the documentation Improvements or additions to documentation label Jan 22, 2026
@msluszniak msluszniak marked this pull request as draft January 22, 2026 15:20
@msluszniak

This comment was marked as resolved.

@msluszniak

This comment was marked as resolved.

@msluszniak msluszniak force-pushed the @ms/add-autogenerated-api-to-docs branch from 470528b to 98ccf0b Compare January 23, 2026 17:48
@msluszniak msluszniak linked an issue Jan 26, 2026 that may be closed by this pull request
@msluszniak

This comment was marked as resolved.

@msluszniak

This comment was marked as resolved.

@msluszniak

This comment was marked as resolved.

@msluszniak msluszniak linked an issue Jan 30, 2026 that may be closed by this pull request
@msluszniak msluszniak marked this pull request as ready for review January 30, 2026 23:18
@msluszniak msluszniak linked an issue Feb 2, 2026 that may be closed by this pull request
@msluszniak msluszniak requested review from chmjkb and mkopcins and removed request for chmjkb February 2, 2026 11:12
Copy link
Collaborator

@chmjkb chmjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, a couple of thoughts:

  1. Can we add some kind of README to explain how the generation works, etc? Maybe I missed it in this file madness 😅
  2. When i enter the API Reference section, and a specific definiton, both the navbar and the bar on the image disappears, can we fix it?
Image


```typescript
// Languages supported by whisper (Multilingual)
type SpeechToTextLanguage =
Copy link
Collaborator

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();
}

/**
Copy link
Collaborator

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

Copy link
Member Author

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

Comment on lines +90 to +92
* Runs the decoder of the model. Passing number[] is deprecated.
*
* @param tokens - The input tokens.
Copy link
Collaborator

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.
Copy link
Collaborator

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

Comment on lines +38 to +43
/**
* 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.
*/
Copy link
Collaborator

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely

@chmjkb
Copy link
Collaborator

chmjkb commented Feb 3, 2026

Also, I got a couple of warnings:

[WARNING] The `siteConfig.onBrokenMarkdownLinks` config option is deprecated and will be removed in Docusaurus v4.
Please migrate and move this option to `siteConfig.markdown.hooks.onBrokenMarkdownLinks` instead.
[info] Loaded plugin typedoc-plugin-markdown
[info] Loaded plugin typedoc-docusaurus-theme
/Users/jakubchmura/Desktop/SWM_AI/react-native-executorch/packages/react-native-executorch/src/modules/natural_language_processing/LLMModule.ts:82:33 - [warning] The relative path ../../03-hooks/01-natural-language-processing/useLLM.md#configuring-the-model is not a file and will not be copied to the output directory

82       * See [Configuring the model](../../03-hooks/01-natural-language-processing/useLLM.md#configuring-the-model) for details.

/Users/jakubchmura/Desktop/SWM_AI/react-native-executorch/packages/react-native-executorch/src/types/llm.ts:73:33 - [warning] The relative path ../../03-hooks/01-natural-language-processing/useLLM.md#configuring-the-model is not a file and will not be copied to the output directory

73       * See [Configuring the model](../../03-hooks/01-natural-language-processing/useLLM.md#configuring-the-model) for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

3 participants