Here "a voice came from heaven" represents people on earth hearing God in heaven speaking. It can be made clear that God spoke to Jesus. Alternate translation: "a voice from heaven said" or "God spoke to Jesus from heaven, saying" (See: [[rc://en/ta/man/jit/figs-metonymy]] and [[rc://en/ta/man/jit/figs-explicit]])