Government-sponsored elections yesterday to set up a local governing body in this township of 1.5 million blacks met with voter apathy and widespread disinterest that many observers regard as a silent protest against the continued detention of Soweto's top black leaders.

There were contested races in only two Soweto's 30 wards. In nine other wards there was only one candidate and in the remaining 19 there were no candidates, reflesting the community's lack of support for the elections.

Shielded by umbrellas in a steady downpour, the voters, mostly middle-aged, straggled into the two polling stations, which were supervised by white officials. The elections were the first time the government has publicly tested its influence in Soweto since it arreste more than 50 community leaders last October.

One non-voter called the election the "joke of the year" as she passed a polling station. "What about the Committee of Ten? Are they out?" she asked. She declined to give her name.

The Committee of Ten was formed by Soweto's leaders last year to negotiate with the government over the rising demands of striking high school students. It gained massive support from Soweto's residents and became recognized as their legitimate, although unelected, representative body. The government, however, refused to negotiate with it and during the crackdown on dissidents Oct. 19, all its members were jailed.

Yesterday's elections were for a Soweto Community Council to replace the Urban Bantu Council. The latter was forced to disband last year under pressure from the high school students, who regarded its members as sell-outs to the white minority government. The Committee of Ten, with the backing of the students, took the place the Urban Bantu Council.

The scarcity of candidates reveals not only the lack of interest in the elections among Soweto's 300,000 eligible voters, but also the political vacuum created by the government's moves against the community's political leaders.

In behavior unusual for political officeseekers, some of the candidates refused to give their names to newspapers when they filed their nomination papers. Their reticence reflects the suspicion and fear that have prevailed among residents of Soweto since the Oct. 19 roundup.

Originally 29 candidates were nominated, but 16 were disqualified for "technical" irregularities, leaving only two contested wards and unopposed candidates in nine others. Although the government can appoint councilors to the 19 vacant seats, the newly appointed minister of plural relations and development (formerly Bantu administration). Connie Mulder, said he would not do this.

As part of his effort to win the black population's trust. Mulder said he would allow by-elections in the 19 wards. Also in an apparent effort ease tensions between the government and the black community. Mulder publicly asked Police Minister Jimmy Kruger to "clarify" the situation of the Committee of Ten. Kruger replied, however, that there were no plans to release the group at this time.

Several ad hoc political groups in Soweto active in the vacuum left by the disappearance of the Committee of Ten. rejected the elections for a Community Council until members of the Committee of Ten are released. Zulu Chief Gatsha Buthelezi, who claims the allegiance of at least 15,000 Zulus living in Soweto, warned that participation in the elections while members of the Committee of Ten remain jailed would be an "act of treachery."

Other political groups in Soweto that advocate communicating with the government, even if it is not on equal terms, urged people to vote. Their reasons were similar to those advanced by 59-year-old Osiah Thebe, a supervisor in a mannequin factory, who ran for the Community Council in one of the two contested wards - his first effor tat political office.

"You cannot build a house by fire, you must build it bypeace," Thebe said. "Things ar going down in Soweto, there is no platform for the people to speak. The power of the council won't have much meaning but we can try to do something (with it)."

Thebe said he especially wanted peace in Soweto so the children can go to school without disruption. "Our children who don't go to school will be good only for streetsweepers and miners," he said.

Those who reject the Community Council scorn those cooperating with it. "They're useless, those statues, they just want to be bribed," said one woman.

The government proposed Community Councils in all the major black townships of South Africa last year. The Committee of Ten, under the chairmanship of Nthato Motlana, rejected the idea because it did not give Sowe immediate municapal status, and because it was not formulated in consultation with Soweto's people.

According to satements by government officials, the Community Councils are regarded as the first step in giving black urban communities municipal status at some unspecified future date. After his reelection last November, Prime Minister John Vorster said. "The black cities must be governed by blacks and as they get more experience, more power should be given to them until ultimately they run their local authority the same as the whites."

This is the closest the ruling National Party has come to offering a blueprint for governing the 9 million blacks who live in the so-called "whites" areas of South Africa, that is, outside the nine black "homelands." Under the government's separate development (apartheid) plan, all the homelands are to become independent and all blacks, even those living in cities in white areas, will become citizens of the homelands. Since it is impossible for all these blacks to physically return to the homelands, the government plans call for them to live in self-governing areas something like city-states.