mattkevan commited on
Commit
a218177
1 Parent(s): 29f61a5

Fix build error

Browse files
backend/voice_presets.py CHANGED
@@ -1,31 +1,31 @@
1
  VOICE_PRESETS = [
2
  {
3
- "id": "british-male",
4
- "name": "British Male",
5
- "desc": "Voice design preset 路 male 路 low pitch 路 british accent",
6
- "initial": "B",
7
- "instruct": "male, low pitch, british accent",
8
  },
9
  {
10
- "id": "british-female",
11
- "name": "British Female",
12
- "desc": "Voice design preset 路 female 路 moderate pitch 路 british accent",
13
- "initial": "B",
14
- "instruct": "female, moderate pitch, british accent",
15
  },
16
  {
17
- "id": "american-male",
18
- "name": "American Male",
19
- "desc": "Voice design preset 路 malemiddle-aged 路 american accent",
20
- "initial": "A",
21
- "instruct": "male, middle-aged, american accent",
22
  },
23
  {
24
- "id": "canadian-female",
25
- "name": "Canadian Female",
26
- "desc": "Voice design preset 路 femaleyoung adult 路 canadian accent",
27
- "initial": "C",
28
- "instruct": "female, young adult, canadian accent",
29
  },
30
  ]
31
 
 
1
  VOICE_PRESETS = [
2
  {
3
+ "id": "the-archivist",
4
+ "name": "The Archivist",
5
+ "desc": "Voice design preset 路 elderly monk 路 low pitch 路 british accent",
6
+ "initial": "A",
7
+ "instruct": "male, elderly, low pitch, british accent",
8
  },
9
  {
10
+ "id": "the-novice",
11
+ "name": "The Novice",
12
+ "desc": "Voice design preset 路 young sister 路 moderate pitch 路 british accent",
13
+ "initial": "N",
14
+ "instruct": "female, young adult, moderate pitch, british accent",
15
  },
16
  {
17
+ "id": "the-warden",
18
+ "name": "The Warden",
19
+ "desc": "Voice design preset 路 stern keeper very low pitch 路 american accent",
20
+ "initial": "W",
21
+ "instruct": "male, middle-aged, very low pitch, american accent",
22
  },
23
  {
24
+ "id": "the-illuminator",
25
+ "name": "The Illuminator",
26
+ "desc": "Voice design preset 路 bright scholar high pitch 路 canadian accent",
27
+ "initial": "I",
28
+ "instruct": "female, middle-aged, high pitch, canadian accent",
29
  },
30
  ]
31
 
frontend/app.js CHANGED
@@ -3,10 +3,10 @@ import { Client, handle_file } from "https://esm.sh/@gradio/client";
3
  const NARRATORS = globalThis.__VOICE_PRESETS__ || [];
4
  const VOICE_DESIGN_OPTIONS = globalThis.__VOICE_DESIGN_OPTIONS__ || [];
5
  const DEFAULT_NARRATOR = NARRATORS[0] || {
6
- id: "british-male",
7
- name: "British Male",
8
- desc: "Voice design preset 路 male 路 low pitch 路 british accent",
9
- initial: "B",
10
  };
11
 
12
  const VOICE_WARNING =
 
3
  const NARRATORS = globalThis.__VOICE_PRESETS__ || [];
4
  const VOICE_DESIGN_OPTIONS = globalThis.__VOICE_DESIGN_OPTIONS__ || [];
5
  const DEFAULT_NARRATOR = NARRATORS[0] || {
6
+ id: "the-archivist",
7
+ name: "The Archivist",
8
+ desc: "Voice design preset 路 elderly monk 路 low pitch 路 british accent",
9
+ initial: "A",
10
  };
11
 
12
  const VOICE_WARNING =
tests/test_voice_presets.py CHANGED
@@ -8,6 +8,39 @@ from backend.voice_design import VOICE_DESIGN_OPTIONS
8
  from backend.voice_presets import VOICE_PRESETS
9
 
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  def test_voice_presets_use_only_supported_omnivoice_design_tokens() -> None:
12
  for preset in VOICE_PRESETS:
13
  instruct = preset["instruct"]
 
8
  from backend.voice_presets import VOICE_PRESETS
9
 
10
 
11
+ def test_voice_presets_match_their_scriptorium_descriptions() -> None:
12
+ assert VOICE_PRESETS == [
13
+ {
14
+ "id": "the-archivist",
15
+ "name": "The Archivist",
16
+ "desc": "Voice design preset 路 elderly monk 路 low pitch 路 british accent",
17
+ "initial": "A",
18
+ "instruct": "male, elderly, low pitch, british accent",
19
+ },
20
+ {
21
+ "id": "the-novice",
22
+ "name": "The Novice",
23
+ "desc": "Voice design preset 路 young sister 路 moderate pitch 路 british accent",
24
+ "initial": "N",
25
+ "instruct": "female, young adult, moderate pitch, british accent",
26
+ },
27
+ {
28
+ "id": "the-warden",
29
+ "name": "The Warden",
30
+ "desc": "Voice design preset 路 stern keeper 路 very low pitch 路 american accent",
31
+ "initial": "W",
32
+ "instruct": "male, middle-aged, very low pitch, american accent",
33
+ },
34
+ {
35
+ "id": "the-illuminator",
36
+ "name": "The Illuminator",
37
+ "desc": "Voice design preset 路 bright scholar 路 high pitch 路 canadian accent",
38
+ "initial": "I",
39
+ "instruct": "female, middle-aged, high pitch, canadian accent",
40
+ },
41
+ ]
42
+
43
+
44
  def test_voice_presets_use_only_supported_omnivoice_design_tokens() -> None:
45
  for preset in VOICE_PRESETS:
46
  instruct = preset["instruct"]