Tehillim Perek 32 is apparently a psalm written by David HaMelech himself, adressed to Hashem (I'm not in love with this translation, but it works):
לְדָוִ֗ד מַ֫שְׂכִּ֥יל אַשְׁרֵ֥י נְֽשׂוּי־פֶּ֗שַׁע כְּס֣וּי חֲטָאָֽה׃ אַ֥שְֽׁרֵי אָדָ֗ם לֹ֤א יַחְשֹׁ֬ב יְהוָ֣ה ל֣וֹ עָוֺ֑ן וְאֵ֖ין בְּרוּח֣וֹ רְמִיָּֽה׃ כִּֽי־הֶ֭חֱרַשְׁתִּי בָּל֣וּ עֲצָמָ֑י בְּ֝שַֽׁאֲגָתִ֗י כָּל־הַיּֽוֹם׃ כִּ֤י ׀ יוֹמָ֣ם וָלַיְלָה֮ תִּכְבַּ֥ד עָלַ֗י יָ֫דֶ֥ךָ נֶהְפַּ֥ךְ לְשַׁדִּ֑י בְּחַרְבֹ֖נֵי קַ֣יִץ סֶֽלָה׃ חַטָּאתִ֨י אוֹדִ֪יעֲךָ֡ וַֽעֲ֘וֺנִ֤י לֹֽא־כִסִּ֗יתִי אָמַ֗רְתִּי אוֹדֶ֤ה עֲלֵ֣י פְ֭שָׁעַי לַֽיהוָ֑ה וְאַתָּ֨ה נָ֘שָׂ֤אתָ עֲוֺ֖ן חַטָּאתִ֣י סֶֽלָה׃ עַל־זֹ֡את יִתְפַּלֵּ֬ל כָּל־חָסִ֨יד ׀ אֵלֶיךָ֮ לְעֵ֪ת מְ֫צֹ֥א רַ֗ק לְ֭שֵׁטֶף מַ֣יִם רַבִּ֑ים אֵ֝לָ֗יו לֹ֣א יַגִּֽיעוּ׃ אַתָּ֤ה ׀ סֵ֥תֶר לִי֮ מִצַּ֪ר תִּ֫צְּרֵ֥נִי רָנֵּ֥י פַלֵּ֑ט תְּס֖וֹבְבֵ֣נִי סֶֽלָה׃
[A Psalm] of David. Maschil. Happy is he whose transgression is forgiven, whose sin is pardoned. Happy is the man unto whom the LORD counteth not iniquity, and in whose spirit there is no guile. When I kept silence, my bones wore away through my groaning all the day long. For day and night Thy hand was heavy upon me; my sap was turned as in the droughts of summer. Selah I acknowledged my sin unto Thee, and mine iniquity have I not hid; I said: 'I will make confession concerning my transgressions unto the LORD'– and Thou, Thou forgavest the iniquity of my sin. Selah For this let every one that is godly pray unto Thee in a time when Thou mayest be found; surely, when the great waters overflow, they will not reach unto him. Thou art my hiding-place; Thou wilt preserve me from the adversary; with songs of deliverance Thou wilt compass me about. Selah
Most of the text bears this out quite nicely, with the exception of psukim 8 and 9, which to my ears appear to be spoken by HaShem:
אַשְׂכִּֽילְךָ֨ ׀ וְֽאוֹרְךָ֗ בְּדֶֽרֶךְ־ז֥וּ תֵלֵ֑ךְ אִֽיעֲצָ֖ה עָלֶ֣יךָ עֵינִֽי׃ אַל־תִּֽהְי֤וּ ׀ כְּס֥וּס כְּפֶרֶד֮ אֵ֤ין הָ֫בִ֥ין בְּמֶֽתֶג־וָרֶ֣סֶן עֶדְי֣וֹ לִבְל֑וֹם בַּ֝֗ל קְרֹ֣ב אֵלֶֽיךָ׃
"I will instruct thee and teach thee in the way which thou shalt go; I will give counsel, Mine eye being upon thee." Be ye not as the horse, or as the mule, which have no understanding; whose mouth must be held in with bit and bridle, that they come not near unto thee.
רַבִּ֥ים מַכְאוֹבִ֗ים לָרָ֫שָׁ֥ע וְהַבּוֹטֵ֥חַ בַּֽיהוָ֑ה חֶ֝֗סֶד יְסֽוֹבְבֶֽנּוּ׃ שִׂמְח֬וּ בַֽיהוָ֣ה וְ֭גִילוּ צַדִּיקִ֑ים וְ֝הַרְנִ֗ינוּ כָּל־יִשְׁרֵי־לֵֽב׃
Many are the sorrows of the wicked; but he that trusteth in the LORD, mercy compasseth him about. Be glad in the LORD, and rejoice, ye righteous; and shout for joy, all ye that are upright in heart.
"I will instruct you and teach you in the way you should go" is a pretty strange thing to say to Hashem, "Be not as the horse or as the mule" is even stranger.
The rest of the psalm, though, is clearly addressed to Him. If it is indeed Hashem speaking these two lines, shouldn't there be more of an indication of that, or a transition of some sort? I can't think of anywhere else in tehillim that this happens.
As a side note, my printed version has the translation of psuk 8 as "I will instruct you in the way in which you should go; I will signal you with (the winking of) my eye". Which rings truer to you, the latter translation or the one provided above, "Mine eye being upon thee"?