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
.
Installation for Bun:
bun add vot.js
Installation for NPM:
npm install vot.js
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.toil.cc",
});
You can see more code examples here
- The library can't translate videos longer than 4 hours
- To translate udemy, coursera, coursehunter and other sites that have authorization, you must create your own handlers
To build, you must have:
Don't forget to install the dependencies:
bun install
This build option should be used in most cases if your changes do not affect the .proto
file.
bun build:bun
If you want to build the library by updating the proto files, then you need to install protoc 3+ and add it to the Path.
Building from Linux (maybe on MacOS it will work too):
bun rebuild:linux
Building from Windows:
bun rebuild:win
You can use this build option if you only want to build types for TypeScript:
bun build:declaration
You can use this build option if you only want to build types for TypeBox:
bun build:typebox
You can use this build option if you only want to convert the .proto
file to .ts
(this will not update the file in the /dist folder):
Building from Linux (maybe on MacOS it will work too):
bun build:proto-linux
Building from Windows:
bun build:proto-win
The library has minimal test coverage to check its performance.
Run the tests:
bun test