(covers information from several alternate timelines)
The computer voice was an audio interface program designed to allow computers to express information verbally. Many space-faring cultures, such as the United Federation of Planets, the Romulan Star Empire and the Cardassian Union, equipped their computers with this feature.
The computer voice of the USS Enterprise was reprogrammed in 2267 on Cygnet XIV, with the intent of giving it a less mechanized personality. The resulting modifications caused the computer to address James T. Kirk in an increasingly amorous manner, as well as giggle. This modification was short-lived. (TOS: "Tomorrow is Yesterday")
Background information Edit
The computer voice on most Federation starship and fixed installation computers was portrayed by Majel Barrett-Roddenberry since the early days of the original series (first appearing in TOS: "Mudd's Women"). The computer voice in TOS was very rhythmic and mechanical. In the later series, it became a far more normal-sounding female voice. Majel Barrett-Roddenberry continued to play Starfleet computers on TNG (with the exception of some early episodes), DS9, VOY, and many Star Trek films through 2009. Star Trek was her final performance both as the computer voice and in a Star Trek project before her death.
In Star Trek III: The Search for Spock, the computer voice of the USS Excelsior turbolift was played by Director Leonard Nimoy, under the pseudonym "Frank Force". Harve Bennett provided the flight recorder voice in the same movie, during playback of scenes showing Spock's death from The Wrath of Khan. Judi Durand did a Spacedock computer voice that says, "Danger... space doors are closed" while the USS Enterprise is escaping from the station. Teresa E. Victor was the computer voice for the USS Enterprise self-destruct sequence in The Search for Spock.
There is only a single word spoken by a computer voice in the entire run of Star Trek: Enterprise, which is when Majel Barrett's computer voice of the USS Defiant twice states "Working..." in the episode "In a Mirror, Darkly, Part II".
In DIS: "Context Is for Kings", the voice of the USS Discovery was provided by Julianne Grossman. In the Star Trek: Short Treks episode "Calypso", Discovery's computer, now a millennia in the future and having evolved into the artificial intelligence, Zora, was voiced by Annabelle Wallis.
In reality, when Google first developed voice technology, they named it "Majel" in honor of Majel Barrett. (After Trek: "Episode 2") Nowadays, Amazon Echo smart speakers can be adjusted to respond to the wake word "computer" (rather than "Alexa"), much as with the computer voice in Star Trek, and so-called "skills" based on the franchise can be enabled within such devices.