vidnavigator 0.1.4 → 0.1.5
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/README.md +3 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/index.ts +15 -0
package/README.md
CHANGED
|
@@ -99,6 +99,9 @@ All methods return a `Promise` that resolves with an object containing rich data
|
|
|
99
99
|
### Transcripts
|
|
100
100
|
- `vn.getTranscript(payload)`
|
|
101
101
|
|
|
102
|
+
### Transcribe
|
|
103
|
+
- `vn.transcribeVideo(payload)`
|
|
104
|
+
|
|
102
105
|
### Files
|
|
103
106
|
- `vn.getFiles([query])`
|
|
104
107
|
- `vn.getFile(file_id)`
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export declare class VidNavigatorClient {
|
|
|
18
18
|
video_info: VideoInfo;
|
|
19
19
|
transcript: TranscriptSegment[];
|
|
20
20
|
}>;
|
|
21
|
+
transcribeVideo(payload: {
|
|
22
|
+
video_url: string;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
video_info: VideoInfo;
|
|
25
|
+
transcript: TranscriptSegment[];
|
|
26
|
+
}>;
|
|
21
27
|
getFiles(query?: {
|
|
22
28
|
limit?: number;
|
|
23
29
|
offset?: number;
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,13 @@ class VidNavigatorClient {
|
|
|
90
90
|
transcript: response.data.transcript.map(models_1.TranscriptSegment.fromJSON),
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
+
async transcribeVideo(payload) {
|
|
94
|
+
const response = await this.request('POST', '/transcribe', payload);
|
|
95
|
+
return {
|
|
96
|
+
video_info: models_1.VideoInfo.fromJSON(response.data.video_info),
|
|
97
|
+
transcript: response.data.transcript.map(models_1.TranscriptSegment.fromJSON),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
93
100
|
//endregion
|
|
94
101
|
//region --- Files ---
|
|
95
102
|
async getFiles(query) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -120,6 +120,21 @@ export class VidNavigatorClient {
|
|
|
120
120
|
transcript: response.data.transcript.map(TranscriptSegment.fromJSON),
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
async transcribeVideo(payload: { video_url: string }): Promise<{
|
|
125
|
+
video_info: VideoInfo;
|
|
126
|
+
transcript: TranscriptSegment[];
|
|
127
|
+
}> {
|
|
128
|
+
const response = await this.request<ApiSuccessResponse<{
|
|
129
|
+
video_info: VideoInfoJSON;
|
|
130
|
+
transcript: TranscriptSegmentJSON[];
|
|
131
|
+
}>>('POST', '/transcribe', payload);
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
video_info: VideoInfo.fromJSON(response.data.video_info),
|
|
135
|
+
transcript: response.data.transcript.map(TranscriptSegment.fromJSON),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
123
138
|
//endregion
|
|
124
139
|
|
|
125
140
|
//region --- Files ---
|