Skip to content

Commit

Permalink
chore: bump xsai, update speech params (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa authored Jan 9, 2025
1 parent acf0d63 commit e0bae0b
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 81 deletions.
12 changes: 6 additions & 6 deletions packages/stage-tamagotchi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"@vueuse/core": "^12.3.0",
"@vueuse/head": "^2.0.0",
"@vueuse/shared": "^12.3.0",
"@xsai/generate-speech": "^0.0.24",
"@xsai/generate-text": "^0.0.24",
"@xsai/model": "^0.0.24",
"@xsai/providers": "^0.0.24",
"@xsai/shared-chat": "^0.0.24",
"@xsai/stream-text": "^0.0.24",
"@xsai/generate-speech": "catalog:",
"@xsai/generate-text": "catalog:",
"@xsai/model": "catalog:",
"@xsai/providers": "catalog:",
"@xsai/shared-chat": "catalog:",
"@xsai/stream-text": "catalog:",
"defu": "^6.1.4",
"jszip": "^3.10.1",
"nprogress": "^0.2.0",
Expand Down
5 changes: 2 additions & 3 deletions packages/stage-ui/src/components/Widgets/Stage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,14 @@ const ttsQueue = useQueue<string>({
baseURL: 'https://unspeech.hyp3r.link/v1/',
})
const res = await generateSpeech({
...elevenlabs.speech({
model: 'elevenlabs/eleven_multilingual_v2',
voice: voiceMap[voice],
...elevenlabs.speech('eleven_multilingual_v2', {
voiceSettings: {
stability: 0.4,
similarityBoost: 0.5,
},
}),
input: ctx.data,
voice: voiceMap[voice],
})
const elapsed = Date.now() - now
Expand Down
12 changes: 6 additions & 6 deletions packages/stage-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@
"@vueuse/core": "^12.3.0",
"@vueuse/head": "^2.0.0",
"@vueuse/shared": "^12.3.0",
"@xsai/generate-speech": "^0.0.24",
"@xsai/generate-text": "^0.0.24",
"@xsai/model": "^0.0.24",
"@xsai/providers": "^0.0.24",
"@xsai/shared-chat": "^0.0.24",
"@xsai/stream-text": "^0.0.24",
"@xsai/generate-speech": "catalog:",
"@xsai/generate-text": "catalog:",
"@xsai/model": "catalog:",
"@xsai/providers": "catalog:",
"@xsai/shared-chat": "catalog:",
"@xsai/stream-text": "catalog:",
"defu": "^6.1.4",
"jszip": "^3.10.1",
"nprogress": "^0.2.0",
Expand Down
139 changes: 80 additions & 59 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ packages:
- 'services/**'
- 'examples/**'
- '!**/dist/**'

catalog:
'@xsai/generate-speech': ^0.0.26
'@xsai/generate-text': ^0.0.26
'@xsai/model': ^0.0.26
'@xsai/providers': ^0.0.26
'@xsai/shared-chat': ^0.0.26
'@xsai/stream-text': ^0.0.26
8 changes: 4 additions & 4 deletions services/discord-voice-bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
"@dotenvx/dotenvx": "^1.32.1",
"@guiiai/logg": "^1.0.6",
"@huggingface/transformers": "^3.2.4",
"@xsai/generate-speech": "^0.0.24",
"@xsai/generate-text": "^0.0.24",
"@xsai/providers": "^0.0.24",
"@xsai/shared-chat": "^0.0.24",
"@xsai/generate-speech": "catalog:",
"@xsai/generate-text": "catalog:",
"@xsai/providers": "catalog:",
"@xsai/shared-chat": "catalog:",
"discord.js": "^14.17.3",
"libsodium-wrappers": "^0.7.15",
"opusscript": "^0.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,14 @@ export async function handleSummon(log: ReturnType<typeof useLogg>, interaction:
})

const speechRes = await generateSpeech({
...elevenlabs.speech({
model: 'eleven_multilingual_v2',
voice: 'lNxY9WuCBCZCISASyJ55',
...elevenlabs.speech('eleven_multilingual_v2', {
voiceSettings: {
stability: 0.4,
similarityBoost: 0.5,
},
}),
input: res.text,
voice: 'lNxY9WuCBCZCISASyJ55',
})

log.withField('length', speechRes.byteLength).log('Generated speech')
Expand Down

0 comments on commit e0bae0b

Please sign in to comment.