csukuangfj commited on
Commit
ec2c459
·
1 Parent(s): 1d8ae66

update model

Browse files
Files changed (1) hide show
  1. app-tts.js +4 -2
app-tts.js CHANGED
@@ -95,8 +95,10 @@ Module.setStatus = function(status) {
95
  const total = BigInt(downloadMatch[2]);
96
  const percent =
97
  total === 0 ? 0.00 : Number((downloaded * 10000n) / total) / 100;
98
- status = `Downloading data... ${percent.toFixed(2)}% (${downloadMatch[1]}/${
99
- downloadMatch[2]})`;
 
 
100
  console.log(`here ${status}`)
101
  }
102
 
 
95
  const total = BigInt(downloadMatch[2]);
96
  const percent =
97
  total === 0 ? 0.00 : Number((downloaded * 10000n) / total) / 100;
98
+ const downloadedMB = Number(downloaded) / (1024 * 1024);
99
+ const totalMB = Number(total) / (1024 * 1024);
100
+ status = `Downloading data... ${percent.toFixed(2)}% (${downloadedMB.toFixed(2)} MB/${
101
+ totalMB.toFixed(2)} MB)`;
102
  console.log(`here ${status}`)
103
  }
104