diablofx commited on
Commit
ce0b765
1 Parent(s): 2507f73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -37,8 +37,8 @@ def process_audio_and_display_info(audio_file, interval):
37
  seconds, milliseconds = divmod(seconds, 1)
38
  milliseconds *= 1000 # convert from seconds to milliseconds
39
 
40
- # Convert bitrate to mb/s
41
- bitrate = audio_info.samplerate * audio_info.channels * bit_depth / 8 / 1024 / 1024
42
 
43
  # Calculate speed in kbps
44
  speed_in_kbps = audio_info.samplerate * bit_depth / 1000
@@ -49,7 +49,7 @@ def process_audio_and_display_info(audio_file, interval):
49
  | :---: | :---: |
50
  | File Name | {os.path.basename(audio_file)} |
51
  | Duration | {int(minutes)} minutes - {int(seconds)} seconds - {int(milliseconds)} milliseconds |
52
- | Bitrate | {speed_in_kbps} kbp/s |
53
  | Audio Channels | {audio_info.channels} |
54
  | Samples per second | {audio_info.samplerate} Hz |
55
  | Bit per second | {audio_info.samplerate * audio_info.channels * bit_depth} bit/s |
@@ -61,5 +61,6 @@ def process_audio_and_display_info(audio_file, interval):
61
  # Return the information table and the download link
62
  return info_table, download_link
63
 
 
64
  if __name__ == "__main__":
65
  main()
 
37
  seconds, milliseconds = divmod(seconds, 1)
38
  milliseconds *= 1000 # convert from seconds to milliseconds
39
 
40
+ # Convert bitrate to kbp/s
41
+ bitrate = audio_info.samplerate * audio_info.channels * bit_depth / 1000
42
 
43
  # Calculate speed in kbps
44
  speed_in_kbps = audio_info.samplerate * bit_depth / 1000
 
49
  | :---: | :---: |
50
  | File Name | {os.path.basename(audio_file)} |
51
  | Duration | {int(minutes)} minutes - {int(seconds)} seconds - {int(milliseconds)} milliseconds |
52
+ | Bitrate | {bitrate} kbp/s |
53
  | Audio Channels | {audio_info.channels} |
54
  | Samples per second | {audio_info.samplerate} Hz |
55
  | Bit per second | {audio_info.samplerate * audio_info.channels * bit_depth} bit/s |
 
61
  # Return the information table and the download link
62
  return info_table, download_link
63
 
64
+
65
  if __name__ == "__main__":
66
  main()