There were a few modifications in the mixer file, similar to Oneplus 5 & 5T.
*I am not responsible for any damage to your device*
You will need a stock rom with Magisk installed.
Just add the module in magisk & reboot.
If you want it to be more loud, flash the cleanslate kernel and increase the earpiece gain.(*At your own risk)
Download v3 : DRIVE
Download v3 [With Unity & AML Support] : #232
OLD VERSIONS :
Youtube Video :
Featured On XDA Portal
v1 - Initial Release v2 - Fixed the earpiece not working in several apps. The mod is now standalone and works without Viper as well v3 - Fixed the earpiece not working during call