Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST]: An API to allow text to speech connection for the App to generate #1462

Open
cassitly opened this issue Feb 23, 2025 · 0 comments

Comments

@cassitly
Copy link

In a few words, describe your idea

The idea is to allow the API to host a local api server. in which another script and send an request to it and the app returns back an generated voice.mp3 file

More information

This is basically so that people can use the great Speech to Speech system on this app to create a Text to Speech (TTS) API easily. I'm assuming that this app already uses a Speech To Text (STT) module to translates the words being spoken into text, then for the TTS module to create a voice file that gets played. I don't know how this app works. But I assume that's how it works.

So it could be as simple as getting the local API server to ignore the STT part and send the request straight to the TTS module that can send back an audio file of the speech.

Soo in simple terms this is a diagram.

Post Request (for a TTS to) --> Local API Server ---> (Posts request to call) TTS Module ---> (returns) Audio file ---> (returns back to the request)

A person can make an script that sends an request to the api server, locally hosted by the App. And the request could look something like this:

const api = fetch("localhost:300", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
    },
    body: JSON.stringify({ message: "Hello, world!" }),
});

audio.play(api)

This is in javascript. And the app could have an option for the developer to enable this local api server.

Thanks, cassitly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant