This is the beginning of the end of John's vision. In verse 6 the angel is speaking to John. In verse 7, Jesus is speaking. This can be shown clearly as is is in the UDB. (See: [[rc://en/ta/man/translate/figs-explicit]])
Here "words" refers to the message that they formed. See how you translated this in [Revelation 21:5](../21/05.md). Alternate translation: "This message is trustworthy and true" (See: [[rc://en/ta/man/translate/figs-metonymy]])
Possible meanings are 1) the word "spirits" refers to the inward disposition of the prophets and indicates that God inspires them. Alternate translation: "God who inspires the prophets" or 2) the word "spirits" refers to the Holy Spirit who inspires the prophets. Alternate translation: "God who gives his Spirit to the prophets" (See: [[rc://en/ta/man/translate/figs-metonymy]])