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

Any way to retrieve the voice message from the character.ai response? #189

Closed
chimaerra opened this issue Nov 22, 2024 · 3 comments
Closed

Comments

@chimaerra
Copy link

I mean this in the character.ai text, just above the text bubble there's a button to play audio with the voice of the picked character. On click there's an event in the network tab (replay) "/multimodal/api/v1/memo/replay", in the response itself there's a link to a temporarily stored mp3 file with some kind of tokenization "https://storage.googleapis.com/character-ai-multimodal-memo/voice_generated/". I tried to look up similar issues but I've only found the references of a call, not text-driven audio response.
66

@realcoloride
Copy link
Owner

realcoloride commented Nov 22, 2024

Hello, this is a feature that has been implemented in the 2.0 branch, but it is currently in work.
The 1.1+ versions are currently not worked on anymore and all work has shifted to the 2.0 branch.

#180
https://github.com/realcoloride/node_characterai/blob/2.0/src/chat/message.ts#L301

@chimaerra
Copy link
Author

Oh well, I unfortunately have no clue how to work with typescript by any means, so I guess I'll wait for a release of it, thanks.

@realcoloride
Copy link
Owner

At the moment I'm working intensively on it, but I appreciate your patience.
In the mean time, here is how you can do it yourself:
https://github.com/realcoloride/node_characterai/blob/2.0/src/chat/candidate.ts#L114

The endpoint is https://neo.character.ai/multimodal/api/v1/memo/replay, POST request,
make sure to include the following in your body:

            body: Parser.stringify({ 
                candidateId: this.candidateId,
                roomId: this.message.chatId,
                turnId: this.message.turnId,
                voiceId,
                voiceQuery
            }),

Hope this helps you out.

Cheers

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

2 participants