rolexx commited on
Commit
11d9f5e
·
1 Parent(s): 1d105b9
Files changed (1) hide show
  1. src/app/api/voice/route.ts +7 -6
src/app/api/voice/route.ts CHANGED
@@ -3,31 +3,31 @@ import { NextResponse } from 'next/server';
3
  const VOICES = {
4
  fr: {
5
  LAWYER_VOICE: {
6
- id: "ThT5KcBeYPX3keUQqHPh",
7
  volume: 0
8
  },
9
  GLITCH_VOICE: {
10
- id: "XrExE9yKIg1WjnnlVkGX",
11
  volume: -10
12
  }
13
  },
14
  en: {
15
  LAWYER_VOICE: {
16
- id: "ThT5KcBeYPX3keUQqHPh",
17
  volume: 0
18
  },
19
  GLITCH_VOICE: {
20
- id: "XrExE9yKIg1WjnnlVkGX",
21
  volume: -10
22
  }
23
  },
24
  es: {
25
  LAWYER_VOICE: {
26
- id: "ThT5KcBeYPX3keUQqHPh",
27
  volume: 0
28
  },
29
  GLITCH_VOICE: {
30
- id: "XrExE9yKIg1WjnnlVkGX",
31
  volume: -10
32
  }
33
  }
@@ -56,6 +56,7 @@ export async function POST(request: Request) {
56
  if (i % 2 === 1) {
57
  // Pour les segments glitch, on utilise une voix différente
58
  const voiceConfig = VOICES[language as keyof typeof VOICES].GLITCH_VOICE;
 
59
  const response = await fetch(
60
  `https://api.elevenlabs.io/v1/text-to-speech/${voiceConfig.id}`,
61
  {
 
3
  const VOICES = {
4
  fr: {
5
  LAWYER_VOICE: {
6
+ id: "XgXB0fxFNJAEDoy7QEp5",
7
  volume: 0
8
  },
9
  GLITCH_VOICE: {
10
+ id: "MWhJLNn7P7uvQrOTocc8",
11
  volume: -10
12
  }
13
  },
14
  en: {
15
  LAWYER_VOICE: {
16
+ id: "fd4ATHXiyini901jkN6M",
17
  volume: 0
18
  },
19
  GLITCH_VOICE: {
20
+ id: "ZCgnAThIoaTqZwEGwRb4",
21
  volume: -10
22
  }
23
  },
24
  es: {
25
  LAWYER_VOICE: {
26
+ id: "tozjSvFqKBPpgsJFDfS0",
27
  volume: 0
28
  },
29
  GLITCH_VOICE: {
30
+ id: "AnLaVu7KDTirBKuGkCZt",
31
  volume: -10
32
  }
33
  }
 
56
  if (i % 2 === 1) {
57
  // Pour les segments glitch, on utilise une voix différente
58
  const voiceConfig = VOICES[language as keyof typeof VOICES].GLITCH_VOICE;
59
+ console.log('voiceConfig:', voiceConfig)
60
  const response = await fetch(
61
  `https://api.elevenlabs.io/v1/text-to-speech/${voiceConfig.id}`,
62
  {