The Soviet Union responded sharply yesterday to President Carter's speech on Soviet-American relations, asserting that it is Carter administration policies - not those of the Kremlin - that pose the "main obstacle on the path of detente."

Moscow's reaction was carried within hours of the president's speech on the official news agency Tass and is not therefore likely to be the Kremlin's definitive word. But the angry tone of this initial Soviet retort fore-shadows further trouble ahead in superpower ties.

Singling out Carter's choice to the Soviets of "confrontation or cooperation," the Tass commentary observed:

"This statement sounds strange to say the least. Carter knows very well that it was the Soviet Union that chose long ago and irrevocably the road of peaceful coexistence . . . but evidently in the ruling circles of Washington the choice has still not been made."

The President stressed in his speech. Tass said, that the "United States would be increasing its military expenditure which would be aimed at strengthening NATO's military forces, building up 'mobile forces' and insuring an 'unabated presence in the Pacific Ocean basin.

"As an ever increasing number of states recognize, it is precisely Washington's policy which is the main obstacle on the path of detente, peaceful cooperation and disarmament."

Soviet specialists here said the specific and extensive identification of Carter with the strain in Moscow-Washington relations was significant. The Soviets have in the past avoided mentioning the President himself, blaming instead those around him, particularly national security adviser Zbigniew Brzezinski.

Although datelined from Washington and presented as a news account of Carter's speech, the Tass commentary was thought to have been prepared in a special new department at the Communist Party Central Committee run by Leonid Zamyatin, a close adviser to Soviet party leader Leonid Brezhnev. The department was created, Soviet sources say, to enable Moscow to react more quickly with authoritative statements than it has in the past.

The Tass article was read in full on the main Soviet evening news program lending it additional weight as an official pronouncement, according to Western news agencies reporting from Moscow.

While Tass noted that the President spoke of the "great importance" of continuing strategic arms talks with Moscow, the commentary criticized him for failing to take account of Soviet disarmament proposals, most recently those made at the United Nations special on the issue.

"A substantial part of the President's speech was devoted to fabrications concerning the Soviet Union and its system," Tass remarked. "He again resorted to reptitions of the fabrications which have now standard for American propaganda about the excessive growth of Soviet military night' . . . James Carter clearly needed this whole propaganda collection in order to give grounds to America's and NATO's claims to the role of Global Policeman."

Turning around American charges of Soviet-Cuban adventurism in Africa, Tass said it was the United States and other Western countries that were guilty of unwarranted intervention.

Carter "asserted", the commentary said," that the role of the USSR and Cuba in Africa might hamper the cause of independence of the African states and the removal of 'racial injustice' whereas is well known it is the United States that invariably comes out on the side of racist regimer."

After reading the Soviet reaction yesterday, one senior administration official observed, "They sure did hit us hard.