# They were all filled with the Holy Spirit and

"The Holy Spirit filled all of those who were there and they" 

# speak in other tongues

They were speaking in languages that they did not already know.

# as the Spirit gave them the ability

The Holy Spirit gave them the ability to speak; they were dependent on the Spirit to speak in different languages.