Logo

JigsawStack

Orate supports JigsawStack's speech and transcription services.

JigsawStack offer a suite of small fast models that automate the boring and complex tasks in every tech stack with specialized finetuning.

Setup

The JigsawStack provider is available by default in Orate. To import it, you can use the following code:

import { JigsawStack } from 'orate/jigsawstack';

Configuration

You can use JigsawStack by creating a new instance of the JigsawStack class:

const jigsawstack = new JigsawStack();

This will use the JIGSAWSTACK_API_KEY environment variable. If you don't have this variable set, you can pass your API key as an argument to the constructor.

const jigsawstack = new JigsawStack('your_api_key');

Usage

The JigsawStack provider provides a single interface for all of JigsawStack's speech and transcription services.

Text to Speech

The JigsawStack provider provides a tts function that allows you to create a text-to-speech synthesis function using JigsawStack TTS. By default, the tts function uses the en-US-female-27 voice (accent).

import { speak } from 'orate';
import { JigsawStack } from 'orate/jigsawstack';
 
const speech = await speak({
  model: new JigsawStack().tts(),
  prompt: 'Hello, world!',
});

You can specify the model and voice to use by passing them as arguments to the tts function.

const speech = await speak({
  model: new JigsawStack().tts('en-US-female-27'),
  prompt: 'Hello, world!',
});

You can also specify specific JigsawStack properties by passing them as an argument to the tts function.

const speech = await speak({
  model: new JigsawStack().tts('en-US-female-27', {
    speaker_clone_file_store_key: '...',
  }),
  prompt: 'Hello, world!',
});

Speech to Text

The JigsawStack provider provides a stt function that allows you to create a speech-to-text transcription function using JigsawStack.

import { transcribe } from 'orate';
import { JigsawStack } from 'orate/jigsawstack';
 
const text = await transcribe({
  model: new JigsawStack().stt(),
  audio: new File(...),
});

You can also specify specific JigsawStack properties by passing them as an argument to the stt function.

const text = await transcribe({
  model: new JigsawStack().stt({
    batch_size: 1,
  }),
  audio: new File(...),
});

On this page