@aim-packages/subtitle 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -478,6 +478,7 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
478
478
  assToAimSegments,
479
479
  tingwuToAimSegments,
480
480
  openaiToAimSegments,
481
+ whisperJsonToAimSegments,
481
482
  create as createWhisperStreamParser,
482
483
  create_2 as createTranslateStreamParser,
483
484
  create_3 as createSegmentStreamParser
@@ -761,4 +762,37 @@ declare function chunkArrayStrings(strings: string[], characterLimit: number): s
761
762
  fontFile?: string;
762
763
  };
763
764
 
765
+ declare interface WhisperJSONResult {
766
+ "result": {
767
+ "language": string;
768
+ };
769
+ "transcription": Array<{
770
+ "timestamps": {
771
+ "from": string;
772
+ "to": string;
773
+ };
774
+ "offsets": {
775
+ "from": number;
776
+ "to": number;
777
+ };
778
+ "text": string;
779
+ "tokens": Array<{
780
+ "text": string;
781
+ "timestamps": {
782
+ "from": string;
783
+ "to": string;
784
+ };
785
+ "offsets": {
786
+ "from": number;
787
+ "to": number;
788
+ };
789
+ "id": number;
790
+ "p": number;
791
+ "t_dtw": number;
792
+ }>;
793
+ }>;
794
+ }
795
+
796
+ declare function whisperJsonToAimSegments(json: WhisperJSONResult): Promise<AimSegments[]>;
797
+
764
798
  export { }