The LMNT TypeScript SDK provides convenient access to the LMNT API from server-side TypeScript applications.
Full documentation is available at docs.lmnt.com/api/sdks/typescript.
npm install lmnt-nodeimport Lmnt from 'lmnt-node';
const client = new Lmnt({
apiKey: process.env['LMNT_API_KEY'], // This is the default and can be omitted
});
const response = await client.speech.generate({ text: 'hello world.', voice: 'leah' });
const content = await response.blob();
console.log(content);TypeScript >= 4.5 and Node.js 20 LTS or later are supported.