xsAI v0.3 "future base" is now available! Read Announcement
xsAI0.4.0-beta.4
Generating

Transcription

Transcribes audio into the input language.

install sizeminified sizeminzipped size
npm i @xsai/generate-transcription

Examples

Basic

import {  } from '@xsai/generate-transcription'
import {  } from 'node:fs'

const {  } = await ({
  : '',
  : 'http://localhost:8000/v1/',
  : await ('./test/fixtures/basic.wav', { : 'audio/wav' }),
  : 'basic.wav',
  : 'en',
  : 'deepdml/faster-whisper-large-v3-turbo-ct2',
})

Verbose + Segments

import {  } from '@xsai/generate-transcription'
import {  } from 'node:fs'

const { , , ,  } = await ({ 
  : '',
  : 'http://localhost:8000/v1/',
  : await ('./test/fixtures/basic.wav', { : 'audio/wav' }),
  : 'basic.wav',
  : 'en',
  : 'deepdml/faster-whisper-large-v3-turbo-ct2',
  : 'verbose_json', 
})

Verbose + Words

import {  } from '@xsai/generate-transcription'
import {  } from 'node:fs'

const { , , ,  } = await ({ 
  : '',
  : 'http://localhost:8000/v1/',
  : await ('./test/fixtures/basic.wav', { : 'audio/wav' }),
  : 'basic.wav',
  : 'en',
  : 'deepdml/faster-whisper-large-v3-turbo-ct2',
  : 'verbose_json', 
  : 'word', 
})