xsAI v0.2 is now available! Read Announcement
xsAI0.3.0-beta.6
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', 
})
Edit on GitHub

Last updated on

On this page