How can Hermes and Riku talk? I don't think they ever explain in the anime how Hermes (the motorcycle) and Riku (the dog) can talk.  There are plenty of talking robots, but they're clearly mechanical entities, while Hermes acts more like a person.  Also, electronic speech does not explain Riku.

Is it ever explained how Hermes and Riku have the power of speech, in the light novels or any other medium?
No, it is not explained.

The novels leave many of these up to the reader's interpretation. It is the same as Hideaki Anno leaving the meaning of the ending of Evangelion open (see Q#6) to the viewer's own thoughts, or in Code Geass, where a shot of the cart rider smiling (displaying some features of Lelouch) was cut out in order to make the ending more open.

Kino's Journey is in a fantasy world where science has taken some leaps and bounds in some directions (and became twisted), with some moments that poke your disbelief to see if its suspended or not (like the "Are you a Knife Merchant" moment with the slavers in [episode not remembered]).

It may be somewhat magical (and TVTropes indeed lists it as "magical realism") but not in the usual sense (no mages or spellcasting), with their larger-than-life characters (like when Shizu uses his sword to block bullets).

Some speculate that they do not talk at all, and that it all happens in Kino's mind (and she could indeed be crazy enough under the nogging). That is a possible interpretion. The series is one of self-discovery after all. Or the suggestion in the Land of Books (that Kino is in a VR simulation) is actually true.

I think there are similarities in the universe of Kino and the Petit Prince. Kino's is grittier, but the mixing of subtle fantasy and realism is there.