litagin commited on
Commit
d4d32c6
1 Parent(s): b664172
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -48,6 +48,7 @@ def transcribe_common(audio: str, model: str) -> tuple[str, float]:
48
  logger.info(f"Transcribing {audio} with {model}")
49
  # Get duration of audio
50
  duration = AudioSegment.from_file(audio).duration_seconds
 
51
  if duration > 15:
52
  return "Audio too long, limit is 15 seconds", 0
53
  start_time = time.time()
@@ -96,7 +97,7 @@ initial_md = """
96
  - 現在0.1エポックくらい
97
  - 音声は15秒まで
98
 
99
- pipeにわたすパラメータ:
100
  ```python
101
  generate_kwargs = {
102
  "language": "Japanese",
 
48
  logger.info(f"Transcribing {audio} with {model}")
49
  # Get duration of audio
50
  duration = AudioSegment.from_file(audio).duration_seconds
51
+ logger.info(f"Duration: {duration:.2f}s")
52
  if duration > 15:
53
  return "Audio too long, limit is 15 seconds", 0
54
  start_time = time.time()
 
97
  - 現在0.1エポックくらい
98
  - 音声は15秒まで
99
 
100
+ pipeに渡しているkwargsは以下の通り:
101
  ```python
102
  generate_kwargs = {
103
  "language": "Japanese",