change int2float

This commit is contained in:
adamnsandle
2023-03-28 14:30:35 +00:00
parent 540e092276
commit 6ef43d1c5d
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@
" abs_max = np.abs(sound).max()\n", " abs_max = np.abs(sound).max()\n",
" sound = sound.astype('float32')\n", " sound = sound.astype('float32')\n",
" if abs_max > 0:\n", " if abs_max > 0:\n",
" sound *= 1/abs_max\n", " sound *= 1/32768\n",
" sound = sound.squeeze()\n", " sound = sound.squeeze()\n",
" return sound\n", " return sound\n",
"\n", "\n",

View File

@@ -118,7 +118,7 @@
" abs_max = np.abs(sound).max()\n", " abs_max = np.abs(sound).max()\n",
" sound = sound.astype('float32')\n", " sound = sound.astype('float32')\n",
" if abs_max > 0:\n", " if abs_max > 0:\n",
" sound *= 1/abs_max\n", " sound *= 1/32768\n",
" sound = sound.squeeze() # depends on the use case\n", " sound = sound.squeeze() # depends on the use case\n",
" return sound" " return sound"
] ]