Rhetorical: This verse serves as Alma's transition into his conclusion. While it is a long conclusion, it is nevertheless the summation of his sermon. After having delivered a rather pointed sermon, he now declares his authority for speaking sharply. He tells his audience that he as "spoken according to the commandments of God." As he will make clear in the next phrase, this is not according to his interpretation of written commandments, but rather that he is speaking specifically according to a commandment from God that he should speak thus to them.
Why does Alma wait until this late in his sermon to declare that these things come directly from God? It is quite probable that the congregation came to hear the "pleasing word of God" as did a congregation long before when Jacob had to chastise them (see Jacob 2:8). Comfortable in their actions, they would not have come expecting to have Alma so dramatically delineate their sins and call them to repentance. In that case, Alma needed to move his congregation into the spirit of the sermon. At this point in the sermon, Alma invokes the direct command of the Lord to provide not only the testimony of the things spoken, but the firm declaration that the Lord has seen and judged them.