@remotion/openai-whisper 4.0.363 → 4.0.365
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/package.json +3 -6
- package/dist/test/foreign-api.test.d.ts +0 -1
- package/dist/test/foreign-api.test.js +0 -278
- package/dist/test/get-and-convert.test.d.ts +0 -1
- package/dist/test/get-and-convert.test.js +0 -100
- package/dist/test/issue-50069.test.d.ts +0 -1
- package/dist/test/issue-50069.test.js +0 -66
- package/dist/test/output.d.ts +0 -11
- package/dist/test/output.js +0 -512
- package/dist/test/partial-word.test.d.ts +0 -2
- package/dist/test/partial-word.test.js +0 -65
- package/dist/test/pranav-testcase.test.d.ts +0 -2
- package/dist/test/pranav-testcase.test.js +0 -1127
- package/dist/test/regressions.test.d.ts +0 -1
- package/dist/test/regressions.test.js +0 -124
- package/dist/test/special-chars.test.d.ts +0 -1
- package/dist/test/special-chars.test.js +0 -139
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const bun_test_1 = require("bun:test");
|
|
4
|
-
const openai_whisper_api_to_captions_1 = require("../openai-whisper-api-to-captions");
|
|
5
|
-
const transcript1 = {
|
|
6
|
-
task: 'transcribe',
|
|
7
|
-
text: 'it is 99% better',
|
|
8
|
-
words: [
|
|
9
|
-
{
|
|
10
|
-
start: 1,
|
|
11
|
-
end: 2,
|
|
12
|
-
word: 'it',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
start: 2,
|
|
16
|
-
end: 3,
|
|
17
|
-
word: 'is',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
start: 3,
|
|
21
|
-
end: 4,
|
|
22
|
-
word: '99',
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
start: 4,
|
|
26
|
-
end: 5,
|
|
27
|
-
word: 'better',
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
duration: 3,
|
|
31
|
-
language: 'english',
|
|
32
|
-
};
|
|
33
|
-
const transcript2 = {
|
|
34
|
-
task: 'transcribe',
|
|
35
|
-
text: 'in real-time functions.',
|
|
36
|
-
words: [
|
|
37
|
-
{
|
|
38
|
-
end: 1,
|
|
39
|
-
word: 'in',
|
|
40
|
-
start: 0,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
end: 2,
|
|
44
|
-
word: 'real',
|
|
45
|
-
start: 1,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
end: 3,
|
|
49
|
-
word: 'time',
|
|
50
|
-
start: 2,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
end: 4,
|
|
54
|
-
word: 'functions',
|
|
55
|
-
start: 3,
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
duration: 4,
|
|
59
|
-
language: 'english',
|
|
60
|
-
};
|
|
61
|
-
(0, bun_test_1.test)('Regression test 1', () => {
|
|
62
|
-
(0, bun_test_1.expect)((0, openai_whisper_api_to_captions_1.openAiWhisperApiToCaptions)({ transcription: transcript1 }).captions).toEqual([
|
|
63
|
-
{
|
|
64
|
-
confidence: null,
|
|
65
|
-
endMs: 2000,
|
|
66
|
-
startMs: 1000,
|
|
67
|
-
text: 'it',
|
|
68
|
-
timestampMs: 1500,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
confidence: null,
|
|
72
|
-
endMs: 3000,
|
|
73
|
-
startMs: 2000,
|
|
74
|
-
text: ' is',
|
|
75
|
-
timestampMs: 2500,
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
confidence: null,
|
|
79
|
-
endMs: 4000,
|
|
80
|
-
startMs: 3000,
|
|
81
|
-
text: ' 99%',
|
|
82
|
-
timestampMs: 3500,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
confidence: null,
|
|
86
|
-
endMs: 5000,
|
|
87
|
-
startMs: 4000,
|
|
88
|
-
text: ' better',
|
|
89
|
-
timestampMs: 4500,
|
|
90
|
-
},
|
|
91
|
-
]);
|
|
92
|
-
});
|
|
93
|
-
(0, bun_test_1.test)('Regression test 2', () => {
|
|
94
|
-
(0, bun_test_1.expect)((0, openai_whisper_api_to_captions_1.openAiWhisperApiToCaptions)({ transcription: transcript2 }).captions).toEqual([
|
|
95
|
-
{
|
|
96
|
-
confidence: null,
|
|
97
|
-
endMs: 1000,
|
|
98
|
-
startMs: 0,
|
|
99
|
-
text: 'in',
|
|
100
|
-
timestampMs: 500,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
confidence: null,
|
|
104
|
-
endMs: 2000,
|
|
105
|
-
startMs: 1000,
|
|
106
|
-
text: ' real-',
|
|
107
|
-
timestampMs: 1500,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
confidence: null,
|
|
111
|
-
endMs: 3000,
|
|
112
|
-
startMs: 2000,
|
|
113
|
-
text: 'time',
|
|
114
|
-
timestampMs: 2500,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
confidence: null,
|
|
118
|
-
endMs: 4000,
|
|
119
|
-
startMs: 3000,
|
|
120
|
-
text: ' functions.',
|
|
121
|
-
timestampMs: 3500,
|
|
122
|
-
},
|
|
123
|
-
]);
|
|
124
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const bun_test_1 = require("bun:test");
|
|
4
|
-
const openai_whisper_api_to_captions_1 = require("../openai-whisper-api-to-captions");
|
|
5
|
-
const text = ' $500 that you can spend on a computer right now.';
|
|
6
|
-
const transcript = {
|
|
7
|
-
task: 'transcribe',
|
|
8
|
-
text,
|
|
9
|
-
words: [
|
|
10
|
-
{
|
|
11
|
-
start: 1,
|
|
12
|
-
end: 2,
|
|
13
|
-
word: '$500',
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
start: 3,
|
|
17
|
-
end: 4,
|
|
18
|
-
word: 'that',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
start: 5,
|
|
22
|
-
end: 6,
|
|
23
|
-
word: 'you',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
start: 7,
|
|
27
|
-
end: 8,
|
|
28
|
-
word: 'can',
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
start: 9,
|
|
32
|
-
end: 10,
|
|
33
|
-
word: 'spend',
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
start: 11,
|
|
37
|
-
end: 12,
|
|
38
|
-
word: 'on',
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
start: 13,
|
|
42
|
-
end: 14,
|
|
43
|
-
word: 'a',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
start: 15,
|
|
47
|
-
end: 16,
|
|
48
|
-
word: 'computer',
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
start: 17,
|
|
52
|
-
end: 18,
|
|
53
|
-
word: 'right',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
start: 19,
|
|
57
|
-
end: 20,
|
|
58
|
-
word: 'now.',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
duration: 4,
|
|
62
|
-
language: 'english',
|
|
63
|
-
};
|
|
64
|
-
(0, bun_test_1.test)('should not crash', () => {
|
|
65
|
-
(0, bun_test_1.expect)((0, openai_whisper_api_to_captions_1.openAiWhisperApiToCaptions)({ transcription: transcript })).toEqual({
|
|
66
|
-
captions: [
|
|
67
|
-
{
|
|
68
|
-
confidence: null,
|
|
69
|
-
endMs: 2000,
|
|
70
|
-
startMs: 1000,
|
|
71
|
-
text: ' $500',
|
|
72
|
-
timestampMs: 1500,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
confidence: null,
|
|
76
|
-
endMs: 4000,
|
|
77
|
-
startMs: 3000,
|
|
78
|
-
text: ' that',
|
|
79
|
-
timestampMs: 3500,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
confidence: null,
|
|
83
|
-
endMs: 6000,
|
|
84
|
-
startMs: 5000,
|
|
85
|
-
text: ' you',
|
|
86
|
-
timestampMs: 5500,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
confidence: null,
|
|
90
|
-
endMs: 8000,
|
|
91
|
-
startMs: 7000,
|
|
92
|
-
text: ' can',
|
|
93
|
-
timestampMs: 7500,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
confidence: null,
|
|
97
|
-
endMs: 10000,
|
|
98
|
-
startMs: 9000,
|
|
99
|
-
text: ' spend',
|
|
100
|
-
timestampMs: 9500,
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
confidence: null,
|
|
104
|
-
endMs: 12000,
|
|
105
|
-
startMs: 11000,
|
|
106
|
-
text: ' on',
|
|
107
|
-
timestampMs: 11500,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
confidence: null,
|
|
111
|
-
endMs: 14000,
|
|
112
|
-
startMs: 13000,
|
|
113
|
-
text: ' a',
|
|
114
|
-
timestampMs: 13500,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
confidence: null,
|
|
118
|
-
endMs: 16000,
|
|
119
|
-
startMs: 15000,
|
|
120
|
-
text: ' computer',
|
|
121
|
-
timestampMs: 15500,
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
confidence: null,
|
|
125
|
-
endMs: 18000,
|
|
126
|
-
startMs: 17000,
|
|
127
|
-
text: ' right',
|
|
128
|
-
timestampMs: 17500,
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
confidence: null,
|
|
132
|
-
endMs: 20000,
|
|
133
|
-
startMs: 19000,
|
|
134
|
-
text: ' now.',
|
|
135
|
-
timestampMs: 19500,
|
|
136
|
-
},
|
|
137
|
-
],
|
|
138
|
-
});
|
|
139
|
-
});
|