Following is the prepared text of President Carter's speech:

I congratulate you members of the Class of '78. Although your education has just begun, you have laid the foundation for a career that can be as rewarding and challenging as any in the world.

As officers in the modern Navy, you will be actors in a worldwide political and military drama.You will be called upon not only to master the technicalities of military science and leadership, but also to have a sensitive understanding of the international community in which the Navy operates.

Today I woould like to discuss one of the most important aspects of that international context - the relationship between the world's two greatest powers, the United States and the Soviet Union.

We must realize that, for a very long time, our relationship with the Soviet Union will be competitive. If that competition is to be constructive instead of dangerous and potentially disastrous, then our relationship must be cooperative as well.

We must avoid excessive swings in our public mood - from euphoria when things are going well, to despair when they are not; from an exaggerated sense of compatibility to open expressions of hostility.

Detente between our two countries is central to world peace. It is important for the world, for the American public, and for you as future leaders of the Navy to understand its complex and sensitive nature.

The word "detente" is simplistically defined as "an easing of tension between nations." The word is, in practice, further defined by experience as those nations evolve new means by which they can live together in peace.

To be stable, to be supported by the American people, and to be a basis for widening the scope of cooperation, detente must be broadly defined and truly reciprocal. Both nations must exercise restraint in troubled areas and in turbulent times. Both must honor meticulously those agreements which have already been reached to widen cooperation, mutually limit nuclear arms production, permit the free movement of people and the expression of ideas, and to protect human rights.

Neither of us should entertain the notion that military supremacy can be attained, or that any transient military advantage can be politically exploited. Principal Goal

Our principal goal is to help shape a world which is more responsive to the desire of people everywhere for economic well-being, social justice, political self-determination, and basic human rights.

We seek a world of peace. But such a world must accommodate diversity - social, political and ideological. Only then can there be genuine cooperation among many nations and cultures.

We desire to dominate no one. We will continue to widen our cooperation with the positive new forces in the world.

We want to increase our collaboration with the Soviet Union, but also with the emerging nations, with the countries in Eastern Europe, and with the people's Republic of China. We are particularly dedicated to genuine self-determination and majority rule in those parts of the world where these goals are yet to be attained.

Our long-term objective must be to convince the Soviet Union of the advantages of cooperation and of the costs of disruptive behavior.

We remember that the United States and the Soviet Union were allies in the Second World War. One of the great historical accomplishments of the U.S. Navy was to guide and protect the tremendous shipments of armaments and supplies from our country to Murmansk and other Soviet ports in support of our joint effort to meet the Nazi threat.

In the agony of that massive conflict, 20 million people in the Soviet Union died. Millions more still recall the horror and the hunger of that time.

I am convinced that the people of the Soviet Union want peace. I cannot believe that they could want war.

Through the years our nation has sought accommodation with the Soviet Union as demonstrated by the Austrian Peace Treaty, the Quadripartite Agreement in Berlin, the termination of nuclear testing in the atmosphere, joint scientific explorations in space, trade agreements, the Anti-Ballistic Missile Treaty, and Interim Agreement on Strategic Offensive Armaments and the limited test ban agreement.

Efforts continue now with negotiations toward a SALT II agreement, a comprehensive test ban, reductions in conventional arms transfers to other countries, the prohibition of attacks on satellites, an agreement to stabilize the level of forces deployed in the Indian Ocean, and increased trade, scientific and cultural exchange.

We must be willing to explore such avenues of cooperation despite the basic issues which divide us. The risks of nuclear war alone propel us in this direction. SALT Importance

The numbers and destructive potential of nuclear weapons have been increasing at an alarming rate. That is why a SALT agreement which enhances the security of both nations is of fundamental importance.

We and the Soviet Union are negotiating in good faith because we both know that failure would precipitate a resumption of logical and cultural exchange are among the immediate benefits of cooperation.

However, these efforts to cooperate do not erase the significant differences between us.

What are these differences?

To the Soviet Union, detente seems to mean a continuing aggressive struggle for political advantage and increased influence in a variety of ways.

The Soviet Union apparently sees military power and military assistance as the best means of expanding their influence abroad.

Obviously, areas of instability provide a tempting target for their effort, and all too often they seem ready to exploit any such opportunity.

As became apparent in Korea, Angola and Ethiopia, they prefer to use proxy forces to achieve their purposes.

To other nations the Soviet military buildup appears to be excessive - far beyond any legitimate requirement for defense of themselves or their allies. For more than 15 years they have maintained this program of military growth, investing almost 15 percent of their gross national product in armaments, and this sustained effort continues.

The abuse of basic human rights in their own country in violation of the agreement reached at Helsinki has earned them the condemnation of people everywhere who love freedom. By their actions they have demonstrated that the Soviet system cannot tolerate freely expressed ideas, notions of loyal opposition, and the free movement of peoples.

The Soviet Union attempts to export a totalitarian and repressive form of government, resulting in a closed society.

These characteristics and goals themselves create problems for the Soviet Union.

Outside their tightly controlled bloc, the Soviets have difficult political relations with other nations. Their cultural bonds with others are few and frayed.

Their form of government is becoming increasingly unattractive to other nations, so that even Marxist-Leninist groups no longer look on the Soviet Union as a model to be imitated.

Many countries are becoming concerned that the non-aligned movement is being subverted by Cuba, which is obviously closely aligned with and dependent upon the Soviet Union for economic sustenance and for political and military guidance and direction.

Although the Soviet Union has the second largest economic system in the world, its growth is slowing greatly, and its standard of living does not compare favorably with that of other nations at an equivalent stage of development.

Agricultural production still remains a serious problem for the Soviet Union, so that in times of average or adverse crop-growing conditions they must turn to us or to other nations for food supplies. U.S. Strengths

We are in a much more favorable position. Our industrial base and productivity are unmatched; our scientific and technological capability is superior to all others; our alliances with other free nations are strong and growing stronger; and our military capability is second to none.We are surrounded by friendly neighbors and wide seas. Our societal structure is stable and cohesive, and our foreign policy enjoys bipartisan support which gives it continuity.

Our philosophy is based on personal freedom, the most powerful of all ideas, and our democratic way of life warrants admiration and emulation by other people.

Our work of human rights makes us part of an international tide, growing in force. We are strengthened by being a part of it.

Our growing economic strength is also a major potential influence for the benefit of others. Our gross national product exceeds that of all nine countries in the European Economic Community, and is more than twice as great as that of the Soviet Union. Additionally, we are now learning how to use our resources more wisely, creating a new harmony between our people and our environment.

Our analysis of American military strength also furnishes a basis for confidence.

We know that neither the United States a massive nuclear arms race. I am glad to report that the prospects for a SALT II agreement are good.

Beyond this, improved trade and technomissile launchers, greater throw-weight and more air defense; the United States has more warheads, generally greater accuracy, more heavy bombers, a more balanced nuclear force, better missile submarines and superior anti-submarine warfare capability.

A successful SALT II agreement will leave both nations with equal but lower ceilings on missile launchers and missiles with multiple warheads. We envision in SALT III an even greater mutual reduction in nuclear weapons.

With essential nuclear equivalence, relative conventional force strength has now become more important. The fact is that the military capability of the United States and our Allies is adequate to meet any foreseeable threat.

It is possible that each side tends to exaggerate the relative military capability of the other. Accurate analyses are important as a basis for making decision for the future.

False or excessive estimates of Soviet strength or of American weakness contributes to the effectiveness of Soviet propaganda efforts.

For example, recent alarming news reports of military budget proposals for the U. S. Navy ignored the fact that we have the highest defense budget in history and that the largest portion of this will go to the Navy.

You men are joining a long tradition of superior leadership, seamanship, tactics and ship design. I am confident that the U. S. Navy has no peer on the seas today and that you will keep it so.

Let there be no doubt about our present and future strength. This brief assessment shows that we need not be overly concerned about our ability to compete and to compete successfully. There is certainly no cause for alarm. The healthy self-criticism and free debate which are essential in a democracy should never be confused with weakness, despair or lack of purpose. Policy Toward Soviets

What are the principle elements of American policy toward the Soviet Union?

We will continue to maintain equivalent nuclear strength because we believe that, in the absence of worldwide nuclear disarmament, such equivalency is the least threatening, most stable situation for the world.

We will maintain a prudent and sustained level of military spending, keyed to a stronger NATO, more mobile forces and an undiminished presence in the Pacific. We and our Allies must and will be able to meet any foreseeable challenge to our security from strategic nuclear forces or from conventional forces. America has the capability to honor this commitment without excessive sacrifice by the people of our country, and that commitment to military strength will be honored.

Looking beyond our alliances, we will support worldwide and regional organizations dedicated to enhancing international harmony, such as the United Nations, Organization of American States, and the Organization for African Unity.

In Africa we and our African friends want to see a continent that is free of the dominance of outside powers free fo the bitterness of racial injustice, free of conflict, and free of the burdens of poverty, hunger and disease. We are convinced that the best way to work toward these objectives is through affirmative policies that recognize African realities and aspirations.

The persistent and increase military involvement of the Soviet Union and Cuba in Africa could deny this vision.We are deeply concerned about this threat to regional peace and to the autonomy of countries within which these foreign troops seem permanently to be stationed. This is why I have spoken up on this subject. This is why I and the American people will support African efforts to contain such intrusion as we have done recently in Zaire.

I urge again that all other powers join us in emphasizing works of peace rather than weapons of war in their assistance to Africa. Let the Soviet Union join us in seeking a peaceful and speedy transition to majority rule in Rhodesia and Namibia. Let us see efforts to resolve peacefully the conflicts in Eritrea and Angola. Let us all work - not to divide and seek domination in Africa - but to help those nations fulfill their great potential.

We will seek peace, better communication and understanding, cultural and sciencetific exchange, and increased trade with the Soviet Union and other nations.

We will attempt to prevent the proliferation of nuclear weapons among nations not now having this capability.

We will continue to negotiate constructively and persistently for a fair Strategic Arms Limitation agreement. We know that there are no ideological victories to be won by the use of nuclear weapons. We have no desire to link this negotiation with other competitive relationships nor to impose other special conditions on the process. In a democratic society, however, where public opinion is a integral factor in the shaping and implementation of foreign policy, we recognize that tensions, sharp disputes, or threats to peace will complicate the quest for an agreement. This is not a matter of our preference but a recognition of fact. Confrontation or Cooperation

The Soviet Union can choose either confrontation or cooperation. The United States is adequately prepared to meet either choice.

We would prefer cooperation through a detente that increasingly involves similar restraint for both sides, similar readiness to resolve disputes by negotiation and not violence, similar willingness to compete peacefully and not militarily. Anything less than that is likely to undermine detente, and this is why I hope that no one will underestimate the concerns which I have expressed today.

A competition without restraint and without shared rules will escalate into graver tensions, and our relationship is a whole will suffer. I do not wish this to happen - I do not believe Mr. Brezhnev desires it either - and this is why it is time for us to speak frankly and to face the problem squarely.

By a combination of edequate American strength, of quiet self-restraint in the use of it, of a refusal to believe in the inevitability of war and of a patient and persistent development of more peaceful alternatives, we hope eventually to lead international society into a more stable and hopeful future.

You and I leave here today to do our common duty - protecting our nation's vital interests by peaceful means if possible, by resolute action if necessary.

We go forth sobered by those responsibilities, but confident in our strength. We go forth knowing that our Nation's goals - peace, security liberty for ourselves and others - will ultimately prevail.

To attain those goals our nation will require exactly those qualities of courage, self-sacrifice, idealism and self-discipline, which you as midshipmen have learned so well. That is why your nation expects so much of you and why you have so much to give.

I leave you with my congratulations, and with a prayer that both you and I will prove worthy of the task that is before us and the nation we have sworn to serve.

nor the Soviet Union can launch a nuclear assault on the other without suffering a devastating counterattack which could destroy the aggressor.

Although the Soviet Union has more