mirror of
https://github.com/snakers4/silero-vad.git
synced 2026-02-05 01:49:22 +08:00
change int2float
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
" abs_max = np.abs(sound).max()\n",
|
||||
" sound = sound.astype('float32')\n",
|
||||
" if abs_max > 0:\n",
|
||||
" sound *= 1/abs_max\n",
|
||||
" sound *= 1/32768\n",
|
||||
" sound = sound.squeeze()\n",
|
||||
" return sound\n",
|
||||
"\n",
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
" abs_max = np.abs(sound).max()\n",
|
||||
" sound = sound.astype('float32')\n",
|
||||
" if abs_max > 0:\n",
|
||||
" sound *= 1/abs_max\n",
|
||||
" sound *= 1/32768\n",
|
||||
" sound = sound.squeeze() # depends on the use case\n",
|
||||
" return sound"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user