While no dog can form humane sentences due to to their throat not being constructed in such a manner that allows it (apes can't talk either!) he can press the right buttons to make his will known.
https://kotiliesi.fi/koti/lemmikit/loytokoira-vaatainen-osaa-puhua/Heli constructed a button box with several buttons and connected to a speaker. Then dog pushes the puttons with a paw. He always knows to push the right ones.
Some buttons there were: "who has arrived at the house?" (some person arrives like with an cars and dog presses this one)
"a cat" (dog sees a cat)
A dog can press the button "lets go outside" and then Heli knows its time for walk.
Eventually dog pressed the buttons in such a order that its apparent he thinks he himself is cat.