"How do I distinguish the voice of the Holy Spirit from that of Satan?"
"The Holy Spirit will always align with God's Word."
Satan is a counterfeiter. He masquerades as the Holy Spirit, but God has empowered us to identify his lies and reject them. Jesus gives His divine nature to everyone who believes in Him and surrenders to Him as Lord and Savior (see 1 John 3:9, 4:4). When we receive that divine nature through Christ's blood, we are able to discern Truth from falsehood and to overcome deception, false teaching, and temptation. So trust that if you are following your Savior, you will recognize His voice (see John 10:1-5).
The Holy Spirit will always align with God's Word. When you sin, He will encourage you to repent and turn to God. But Satan will beat you down and try to keep you away from God, saying, "Well, you've sinned. You might as well stay in sin." When you hear the voice of Satan, change the channel. Begin to praise God for His salvation. Begin to praise God for His redemption and grace. Go to God in prayer. Ask the Holy Spirit to send Satan scurrying, and He will. For the Holy Spirit will only speak the Truth we find in Scripture: "[T]here is now no condemnation for those who are in Christ Jesus" (Romans 8:1).