Skip to content

how to run locally with neetsai instead of eleven labs #13

Answered by noahgsolomon
dzbenyaa asked this question in Q&A
Discussion options

You must be logged in to vote

you can run this or something like it

import fetch from 'node-fetch';
import fs from 'fs';
import dotenv from 'dotenv';

dotenv.config();

// andrew-tate, joe-rogan, donald-trump, mark-zuckerberg, alex-jones, bill-gates

async function generateAudio(voice_id, person, line, index) {
	const response = await fetch('https://api.neets.ai/v1/tts', {
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
			'X-API-Key': process.env.NEETS_API_KEY,
		},
		body: JSON.stringify({
			text: line,
			voice_id: voice_id,
			params: {
				model: 'ar-diff-50k',
			},
		}),
	});

	if (!response.ok) {
		throw new Error(`Server responded with status code ${response.status}`);
	}

	const audioS…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Daraido
Comment options

@noahgsolomon
Comment options

Answer selected by dzbenyaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants