
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@tskau/vtrans
Advanced tools
yandex video translation API client written in typescript
npm install --save @tskau/vtrans
# yarn install @tskau/vtrans
# pnpm add @tskau/vtrans
// you can use require() to use tobalt
// const { Client } = require('@tskau/vtrans')
import { Client } from '@tskau/vtrans'
// you can use the vot-worker if you need
// https://github.com/FOSWLY/vot-worker
const client = new Client({ /* baseUrl: 'https://vot.toil.cc/' */ })
// translate the video
try {
const translationResult = await client.translate({
originalUrl: 'https://www.youtube.com/watch?v=rEQm1wU_b9M',
originalLanguage: 'ru', // ru, en, zh, ko, ar, fr, it, es, de, ja
translationLanguage: 'en' // ru, en, kk
})
if (translationResult.status === 'WORK_IN_PROGRESS') {
translationResult.remainingTime // translation remaining time
// can be undefined if it's not provided by server
}
if (translationResult.status === 'SUCCESS') {
await translationResult.translation.content.stream() // readable stream
await translationResult.translation.content.save('/tmp/dolphin-naprosilis-english.mp3') // save as file
translationResult.translation.content.url // 'https://vtrans.s3-private.mds.yandex.net/...'
translationResult.translation.duration // duration in seconds
}
} catch (error) {
// if error is TranslationError
// then error message is likely in russian
// because it's sourced from yandex servers
console.log(error.message)
}
// fetch subtitles
try {
const subtitlesResult = await client.getSubtitles({
originalUrl: 'https://www.youtube.com/watch?v=rEQm1wU_b9M',
originalLanguage: 'ru' // ru, en, zh, ko, kk, ar, fr, it, es, de, ja
})
subtitlesResult.original.language // 'ru'
await subtitlesResult.original.content.stream() // readable stream
await subtitlesResult.original.content.save('/tmp/dolphin-naprosilis-russian-yandex.json') // save as file
subtitlesResult.original.content.url // 'https://brosubs.s3-private.mds.yandex.net/...'
subtitlesResult.translations[0].language // 'en'
await subtitlesResult.translations[0].content.stream() // readable stream
await subtitlesResult.translations[0].content.save('/tmp/dolphin-naprosilis-english-yandex.json') // save as file
subtitlesResult.translations[0].content.url // 'https://brosubs.s3-private.mds.yandex.net/...'
} catch (error) {
console.log(error.message) // 'Subtitles not found'
}
all this exists thanks to Toil's implementation of the CLI/browser extension.
check out the vot-cli (CLI) or voice-over-translation (browser extension).
FAQs
yandex video translation API client written in typescript
We found that @tskau/vtrans demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.