Almost £1m is to be spent on facilities for children and vulnerable adults giving evidence in court cases.
A dedicated facility, due to open in Glasgow in 2019, will allow more of them to avoid having to attend court.
The Scottish Courts and Tribunals Service (SCTS) centre will be created after a £950,000 investment to allow evidence to be pre-recorded.
Justice Secretary Humza Yousaf said it was important to avoid "trauma" for vulnerable witnesses.
The new centre will include what are described as flexible hearing suites and vulnerable witness suites with a direct video link to court.
It will also have a private evidence room with one-way glass to aid observation and a specially-designed sensory room with furnishings and quiet spaces.
Mr Yousaf said: "This is the latest step towards achieving our ambition that children, wherever possible, should not have to give evidence in court during a criminal trial.
"It will make significant improvements to witnesses' experience of the justice system in Glasgow. I am pleased to hear that there is scope for expansion in Scotland and where appropriate, these suites may also be used for vulnerable adult witnesses.
"We believe strongly that the justice system should be compassionate and trauma informed and able to respond effectively to the needs of the victims - both adults and children."
He added: "Earlier this year we introduced the Vulnerable Witnesses Bill to the Scottish Parliament, which proposes reforms to enable the much greater use of pre-recording evidence in advance of a criminal trial."
Although the new centre will initially deal with child witnesses, some adults may also be able to give evidence outwith a court setting.
In May, Scotland's most senior judge said victims of rape and sexual assault should not have to appear in court.
Lord Carloway told the BBC his "ultimate objective" was for alleged victims to be able to give filmed statements within 24 hours.
The judge also said their cross-examination should take place well before the trial and away from court.
He said: "The ultimate objective is to try to get a system in which, first of all, the complainer would get their complaint down as near as possible to the event.
"That would hopefully be, in many cases, within 24 hours of the matter being reported.
"If we can get an account at that time it then becomes a question of using it within the trial process."
Some lawyers expressed concerns that such an approach could make it harder for the accused to receive a fair trial.
Defence QC Derek Ogg said there were already ways of making the court environment more humane such as protective screens to separate the victim from view or using video links.
He said he supported measures to modernise the system and make it a better environment for victims but the fundamental right for a defence counsel to be able to properly cross-examine a witness must be maintained.
Mr Ogg said: "As a defence counsel it does not matter to me where the witness is. All that matters is that I give the witness a chance to tell their story and test their story.
"The hallmark of civilisation is a fair trial for the accused not a presumption that because someone makes an allegation of sexual assault or rape they are telling the truth."