Skip to content

Commit

Permalink
Support AI Label
Browse files Browse the repository at this point in the history
  • Loading branch information
Rifza111 committed Dec 16, 2024
1 parent e7dce61 commit 94e1dc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helpers/Events/tts.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default async function on({ Exp, ev, store, cht, ai, is }) {
}, async() => {
await Exp.sendPresenceUpdate('recording', cht.id);
let v = cht.cmd.startsWith("bell") ? "bella" : cht.cmd == "myka" ? "Myka" : cht.cmd
Exp.sendMessage(id, { audio: { url: `${api.xterm.url}/api/text2speech/elevenlabs?voice=${v}&key=${api.xterm.key}&text=${cht.q}&${config}`}, mimetype: "audio/mpeg" }, { quoted: cht })
Exp.sendMessage(id, { audio: { url: `${api.xterm.url}/api/text2speech/elevenlabs?voice=${v}&key=${api.xterm.key}&text=${cht.q}&${config}`}, mimetype: "audio/mpeg", ai: true }, { quoted: cht })
})

ev.on({
Expand All @@ -87,7 +87,7 @@ export default async function on({ Exp, ev, store, cht, ai, is }) {
if(!Data.voices.includes(voice)) return cht.reply(txtreply)
if(!text) return cht.reply(txtreply)
await Exp.sendPresenceUpdate('recording', cht.id);
Exp.sendMessage(id, { audio: { url: `${api.xterm.url}/api/text2speech/elevenlabs?voice=${voice}&key=${api.xterm.key}&text=${text}`}, mimetype: "audio/mpeg" }, { quoted: cht })
Exp.sendMessage(id, { audio: { url: `${api.xterm.url}/api/text2speech/elevenlabs?voice=${voice}&key=${api.xterm.key}&text=${text}`}, mimetype: "audio/mpeg", ai: true }, { quoted: cht })
})

ev.on({
Expand Down
2 changes: 1 addition & 1 deletion helpers/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function initialize({ Exp, store }) {


} else {
msg = await sendMessage(id, config, etc)
return await sendMessage(id, config, etc)
}
return {
key: {
Expand Down

0 comments on commit 94e1dc6

Please sign in to comment.