Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,11 +39,12 @@ MAX_INPUT_AUDIO_LENGTH = 60 # in seconds
39
  DEFAULT_TARGET_LANGUAGE = "French"
40
 
41
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
 
42
  translator = Translator(
43
  model_name_or_card="seamlessM4T_large",
44
  vocoder_name_or_card="vocoder_36langs",
45
  device=device,
46
- sample_rate=AUDIO_SAMPLE_RATE,
47
  )
48
 
49
 
 
39
  DEFAULT_TARGET_LANGUAGE = "French"
40
 
41
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
42
+ dtype = torch.float16 if torch.cuda.is_available() else torch.float32
43
  translator = Translator(
44
  model_name_or_card="seamlessM4T_large",
45
  vocoder_name_or_card="vocoder_36langs",
46
  device=device,
47
+ dtype=dtype,
48
  )
49
 
50