An unofficial library for interacting with the Yandex VOT API, which supports working with JavaScript, TypeScript, and also has built-in parted types for Typebox.
The library supports working with worker servers, to do this, you need to create a VOTWorkerClient
client and specify the domain of the worker server, for example vot-worker.toil.cc
.
To work with Node, Bun, or other runtimes, install the @vot.js/node
:
bin install @vot.js/node
To develop browser extensions, install the @vot.js/ext
:
bin install @vot.js/ext
If you only need part of the functionality, use the @vot.js/core
and @vot.js/shared
To start working with the API, you need to create a VOT Client. This can be done using the line provided below.
Standard Client:
const client = new VOTClient();
const videoData = await client.getVideoData("https://youtu.be/LK6nLR1bzpI");
const result = await client.translateVideo({ videoData });
Proxying via vot-worker:
const client = new VOTWorkerClient({
host: "vot-worker.toil.cc",
});
You can see more code examples here
- The library can't translate videos longer than 4 hours
To build, you must have:
Don't forget to install the dependencies:
bun install
Start building:
bun build:all
The library has minimal test coverage to check its performance.
Run the tests:
bun test