GitLab CI commited on
Commit
8d626cf
·
1 Parent(s): c27e5a4

Update game build from GitLab CI

Browse files
server/AudioTranscriber.py CHANGED
@@ -26,6 +26,7 @@ class AudioTranscriber(threading.Thread):
26
  text_queue: "Queue[Tuple[str, str]]",
27
  language: str = "en",
28
  confidence_threshold: float = 0.5,
 
29
  ):
30
  super().__init__()
31
  self.audio_queue = audio_queue
@@ -36,6 +37,7 @@ class AudioTranscriber(threading.Thread):
36
  self.transcriber = WhisperModel(
37
  "large",
38
  device="cuda",
 
39
  compute_type="int8",
40
  )
41
 
 
26
  text_queue: "Queue[Tuple[str, str]]",
27
  language: str = "en",
28
  confidence_threshold: float = 0.5,
29
+ device_index: int = 0,
30
  ):
31
  super().__init__()
32
  self.audio_queue = audio_queue
 
37
  self.transcriber = WhisperModel(
38
  "large",
39
  device="cuda",
40
+ device_index=device_index,
41
  compute_type="int8",
42
  )
43
 
server/__main__.py CHANGED
@@ -11,6 +11,8 @@ import sys
11
  from threading import Lock
12
  from multiprocessing import Manager
13
 
 
 
14
  from server.AudioTranscriber import AudioTranscriber
15
  from server.ActionProcessor import ActionProcessor
16
  from server.StandaloneApplication import StandaloneApplication
@@ -237,10 +239,12 @@ if __name__ == "__main__":
237
 
238
  os.makedirs(app.static_folder, exist_ok=True)
239
 
 
 
240
  # Start the audio transcriber thread
241
  transcribers = [
242
- AudioTranscriber(audio_queue, text_queue)
243
- for _ in range(4 if os.getenv("DEBUG") == "True" else 32)
244
  ]
245
  for transcriber in transcribers:
246
  transcriber.start()
 
11
  from threading import Lock
12
  from multiprocessing import Manager
13
 
14
+ import torch
15
+
16
  from server.AudioTranscriber import AudioTranscriber
17
  from server.ActionProcessor import ActionProcessor
18
  from server.StandaloneApplication import StandaloneApplication
 
239
 
240
  os.makedirs(app.static_folder, exist_ok=True)
241
 
242
+ num_devices = torch.cuda.device_count()
243
+
244
  # Start the audio transcriber thread
245
  transcribers = [
246
+ AudioTranscriber(audio_queue, text_queue, device_index=i % num_devices)
247
+ for i in range(4 if os.getenv("DEBUG") == "True" else 32)
248
  ]
249
  for transcriber in transcribers:
250
  transcriber.start()
server/static/godot/index.html CHANGED
@@ -97,7 +97,7 @@ body {
97
 
98
  <script src="index.js"></script>
99
  <script>
100
- const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":18582560,"index.wasm":35376909},"focusCanvas":true,"gdextensionLibs":[]};
101
  const GODOT_THREADS_ENABLED = false;
102
  const engine = new Engine(GODOT_CONFIG);
103
 
 
97
 
98
  <script src="index.js"></script>
99
  <script>
100
+ const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":18582528,"index.wasm":35376909},"focusCanvas":true,"gdextensionLibs":[]};
101
  const GODOT_THREADS_ENABLED = false;
102
  const engine = new Engine(GODOT_CONFIG);
103
 
server/static/godot/index.pck CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec1cd2b27c61d036b88d4e08696c9f029e01aee83777894e465bc51906e9be54
3
- size 18582560
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbe5d83efca3e09d7231e956a5024c58b2ffadf61ad70596b5aeada9c5a9ec48
3
+ size 18582528