topmediai-sdk
v1.1.1
Published
This open-source library was created to simplify the integration of TopMediAi APIs, enabling seamless generation of Text-To-Speech audio, music, and more. It is a non-profit project designed to help developers easily incorporate this technology into their
Readme
TopMediAi SDK
This open-source library was created to simplify the integration of TopMediAi APIs, enabling seamless generation of Text-To-Speech audio, music, and more. It is a non-profit project designed to help developers easily incorporate this technology into their applications.
Contributions are welcome! Feel free to fork, improve, and share.
🚀 How to Use
1️⃣ Install Dependencies
Make sure you have Node.js installed. Then, install the required dependencies:
npm install topmediai-sdk fs2️⃣ Run the Test Script
Create a new file, index.js, and paste the following code:
import fs from "fs";
import { TopMediaAiClient, EmotionEnums } from "topmediai-sdk";
const client = new TopMediaAiClient({
apiKey: "----apikey here----",
});
const stream = await client.generate({
speaker: "00151554-3826-11ee-a861-00163e2ac61b",
text: "Hello, World!",
emotion: EmotionEnums.Friendly,
});
if (stream) {
const fileStream = fs.createWriteStream("output.mp3");
fileStream.write(stream);
fileStream.end();
}💖 Support This Project
If you find this project helpful and want to support its continued development, you can make a donation via:
- GitHub Sponsors
- PayPal
📝 License
This project is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License (CC BY-ND 4.0).
