The announcement comes after the United States and Britain raised concerns about access to the trial.

Chinese prosecutors announced charges against British investigator Peter Humphrey and his American wife, Yu Yingzeng, on Monday. The couple were detained last year following work they did for the British pharmaceutical company.

Two family friends with knowledge of the matter told Reuters earlier this month that the trial was set for Aug. 7 and would be closed to the public.

The couple "will be tried in public" the official Xinhua news agency said on Thursday, citing a statement from the Shanghai No.1 Intermediate People's Court.

"The two defendants hope their families can attend the trail," Xinhua said.

It did not give further information about the decision.

A senior official of the U.S. State Department said the United States had been concerned that U.S. consular officers would not be allowed to attend Yu's trial, despite the fact this was permitted by a 1982 convention between the two countries.

"Reports that the trial will be open to the public, if true, are welcome," the official said.

The official said consular officers had visited Yu regularly since her detention in July last year, most recently on July 2.

The case against Humphrey and his wife has become a key piece in a long-running investigation into GSK, whose China executives have been charged with orchestrating a widespread network of bribery to promote sales.

The U.S. and British embassies had pressed China on the need for a transparent and fair trial.

China's Foreign Ministry had said the proceedings would be handled according to law.

ChinaWhys, the risk consultancy run by the couple, was employed by GSK in April 2013 to investigate a former employee suspected of sending anonymous emails, including the circulation of an intimate video of former GSK China head Mark Reilly with his girlfriend, as well as emails containing allegations of widespread bribery at the British drugmaker.

Humphrey appeared on state-run China Central Television (CCTV) on Monday, saying he and his wife "deeply regret" breaking any Chinese law. He added that their company would not have worked with GSK if the drugmaker had informed him about the full details of the whistleblower emails.

His apology repeated a similar statement he made to CCTV in August last year after the couple were arrested.

Courts in China are tightly controlled by the ruling Communist Party, and defendants are almost always convicted. Access to trials is extremely limited.

"I am very pleased and grateful. I certainly want to attend the trial, and I can't wait to see my parents after more than a year," the couple's son, Harvey Humphrey, said in a statement sent to Reuters.

Xinhua reported earlier that Humphrey and Yu had paid people in Beijing and Shanghai to purchase personal information. Citing the prosecutor on the case, the news agency alleged they had been fully aware of the illegality of their actions.

Between 2009 and 2013, the couple obtained private information through investigations into nearly 1,000 companies and a large number of private individuals, including household registration data, real estate and vehicle documents, and telephone records, Xinhua added.

Humphrey worked for Reuters as a journalist in the 1980s and 1990s. (Additional reporting by John Ruwitch in Shanghai and David Brunnstrom in Washington; editing by Jane Baird)