You could translate all spaces and double quotes to |, then squeeze |s and finally cut from the 2nd character to the end of line:
tr '[[:blank:]"]' \| <infile | tr -s \| | cut -c2-
You could translate all spaces and double quotes to |, then squeeze |s and finally cut from the 2nd character to the end of line:
tr '[[:blank:]"]' \| <infile | tr -s \| | cut -c2-