Add config for speaker and fix some bugs