David's last words were not necessarily his final spoken words (see 1 Kings 1:16, 29–30, 33–35; 2:1–9). They were his last public act of worship to God as king (compare 1 Samuel 12:1–25).
The oracle of David: The language shows he was about to deliver an oracle, a message from God (2 Samuel 23:2).
the sweet psalmist of Israel: For other mentions of David as a musician and poet, see 1 Chronicles 23:5; 2 Chronicles 29:26, 27; Nehemiah 12:36; Amos 6:5.