Category Archives: Coding

Introducing Lleisiwr – Welsh Open Source Voice Banking and Text to Speech

In November 2017, The Language Technology Unit received a small grant from the Welsh Government’s Technology and the Welsh Language Fund, to work with the NHS as partners on a project to allow patients on the brink of losing their voice to bank their voice and then generate a personal digital synthetic voice. This had never before been availabe for Welsh speakers, and is a great step forward for Welsh speaking patients.

More information about this service can be found here including details for sofware developers about the package’s source code.

Here is a short video that shows you how to register for the service

There has been quite a favourable initial response on the social websites :

Introducing Macsen

During 2015-2016 we have been developing new resources that enable you to talking in Welsh with computers. See Start Speaking Welsh to your Computer, Towards a Welsh ‘Siri’

This is a technology which is becoming increasingly prevalent as the human voice is used more and more for question and answer systems on mobile phones and tablets, and voice control for such things as television sets, robots and dictation systems. If Welsh cannot be used in these environments, then the language will be excluded from the digital world and Welsh speakers will have no choice but to speak English with these devices.

In order to pave the way for new Welsh medium technologies we have produced a Welsh question and answer prototype, where a personal assistant called “Macsen” is able to answer questions such as what is the news or weather.

Here is a video that introduces Macsen and demonstrates it at work on a small Raspberry Pi computer:

All of Macsen’s code and resources are available on GitHub so that anyone can expand its capabilities and develop their own Macsen. The homepage for Macsen on the web and where you’ll know where to begin is:

We will continue to work on speech recognition and other open resources for Macsen. Get in touch with us if you’re a software company, coding club, school or a hacker with an interest in including Macsen into your own software projects.

‘Macsen’ was developed within the  ‘Welsh Language Communications Infrastructure’ project which was funded by the Welsh Government and S4C.

Project Raspberry Pi: Symud braich robot gyda’ch llais

Yn yr Eisteddfodau a digwyddiadau Hacio’r Iaith diweddar, rydym wedi arddangos ein breichiau robot sy’n glwm i Raspberry Pis ac sy’n yn ymateb i gyfarwyddyd yn y Gymraeg.

Dyma fideo o dair braich gyda’i gilydd :

Mae’n system adnabod lleferydd syml iawn a nawr, i’r rhai sy’n teimlo’n anturus, dyma gyfarwyddiadau ar sut y gallwch chithau gosod y demo ar eich Raspberry Pi chi.

Byddwch angen yr offer canlynol:

Os rydych yn defnyddio Raspberry Pi hŷn, gyda ddim ond dau borth USB, yna rydych angen hwb USB, fel, er mwyn cysylltu popeth.

Mae’r demo yn defnyddio peiriant adnabod lleferydd cod agored o’r enw ‘Julius’. Mae hefyd yn defnyddio modelau acwstig rydym wedi eu cynhyrchu gyda recordiadau 20 unigolyn yn llefaru promtiau arbennig.

Teipiwch y canlynol o linell gorchymyn ar eich Raspberry Pi er mwyn gosod y system ‘Julius’:

$ sudo apt-get update
$ sudo apt-get install alsa-tools alsa-oss flex zlib1g-dev libc-bin libc-dev-bin python-pexpect libasound2 libasound2-dev cvs
$ cvs -z3 co julius4
$ export CFLAGS="-O2 -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -pipe -fomit-frame-pointer"
$ ./configure --with-mictype=alsa
$ sudo make
$ sudo make install
$ export ALSADEV="plughw:1,0"
$ julius

Os yw’r llinell olaf yn achosi i’r canlynol ymddangos, yna rydych wedi gosod Julius yn llwyddiannus!

Julius rev.4.3.1 - based on
JuliusLib rev.4.3.1 (fast) built for x86_64-unknown-linux-gnu

Copyright (c) 1991-2013 Kawahara Lab., Kyoto University
Copyright (c) 1997-2000 Information-technology Promotion Agency, Japan
Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
Copyright (c) 2005-2013 Julius project team, Nagoya Institute of Technology

Try '-setting' for built-in engine configuration.
Try '-help' for run time options.

Yn nesaf, rhaid i chi lwytho i lawr ein ffeiliau adnabod lleferydd braich robot o’r Porth Technolegau Iaith ar gyfer eu defnyddio gyda Julius.

$ mkdir robot
$ cd robot
$ wget
$ tar -zxvf braichrobot.tar.gz

Ac yna er mwyn cael y Raspberry Pi a’r fraich robot i ymateb i’r gorchmynion ar lafar, teipiwch:

$ cd braichrobot
$ sudo python

Dylai’r gair ‘siaradwch’ ymddangos. Dyma beth fyddwch nawr yn gallu dweud wrth y fraich:

ysgwydd i fyny
ysgwydd i lawr
penelin i fyny
penelin i lawr
arddwrn i fyny
arddwrn i lawr
gafael agor
gafael cau
troi i’r chwith
troi i’r dde
golau ymlaen

Gobeithio bydd y project bach yma yn hwyl yn enwedig i ddisgyblion Ysgol Pont y Gof, Botwnnog a enillodd un o’n breichiau robot mewn cystadleuaeth codio yng Ngholeg Meirion Dwyfor ym Mhwllheli yn ystod yr haf:

Yn y cyfamser, diolch i nawdd gan Lywodraeth Cymru ac S4C, rydym yn parhau i ddatblygu adnabod lleferydd Cymraeg ac i’w chynnig yn rhad ac am ddim o fewn y Porth Technolegau Iaith. Ein bwriad yw datblygu systemau mwy soffistigedig a mwy defnyddiol.

Ond mae angen eich help! Cyfrannwch eich llais drwy ein ap Paldaruo:


iTunes Google Play

Coding a Welsh language robot

As part of our mission to promote the acquisition of computing skills amongst Welsh speakers, the Language Technologies Unit has been developing a series of computer science lessons aimed at primary school children.

The basis of these resources is the Raspberry Pi foundation’s collection of Turing Test lessonsrobot. The resources were originally created in English and placed on the foundation’s website under an open license, allowing for free distribution and sharing.

Our contribution has been to translate the whole course into Welsh, and to place it on GitHub, so that it can be made accessible to the public to use or adapt towards any purpose that they wish. We’ve also created a brand new lesson for the course that is specifically geared towards Welsh speaking children. This special lesson introduces children to some of the resources of the Language Resources Portal, including Welsh language text-to-speech, Cysill Ar-lein (online spelling and grammar checker for Welsh), language detection and parts of speech tagger, all in a fun and easy format.

tyrbinau 006
Children from Garndolbenmaen Primary school enjoying their coding lesson with Dewi Bryn Jones, Patrick Robertson and Rapiro the Robot.

The lesson was trialled by Dewi Bryn Jones and Patrick Robertson at Garndolbenmaen Primary School in March, and was considered a resounding success. See this previous blog post for a video created by the children to learn more about the day’s events.

All of the resources are available on GitHub under an open license here. These include the three original lessons that were translated, the special lesson on adding Welsh features to the robot and also instructions for setting up for teachers and students.

Here is the lesson structure:


And you can find the special Welsh lesson here:


We would like to thank everyone who attended the Through Technological Means conference, and all those who gave presentations and contributed their time and energy towards making it a great day.

But most of all, we’d like to pass our special thanks on to the children of Garndolbenmaen primary school. They came to talk about their experiences using our synthetic voice resources in recent lessons they received on coding with the Raspberry Pi, which were provided by the Unit. They had prepared a video for the conference, but unfortunately there were technical problems when it was played. So now at last (and with apologies for those difficulties), here is the full video that was made by the children of Garndolbenmaen primary school:

The children described to the audience their experience during the lessons, where they were taught core coding skills using the Language Technology Unit’s Welsh medium Turing Test resources. The children also had the opportunity to meet one very special guest – the Vice-chancellor of Bangor University!


The children explained to the Vice-chancellor, professor John Hughes, that they had thoroughly enjoyed working on the project, and that they had learnt a variety of very useful skills. One or two even said that they would like to be professional coders in the future! The children were also able to meet with some of the guest speakers who had travelled from far and wide to attend the conference. Below, from left to right, are John Judge from Ireland, Dwayne Bailey from South Africa (but who is currently working in London) and Kepa Sarasola from the Basque Country .


Here are the children meeting the guest speakers, as well as those members of the Language Technologies Unit who worked on the Language Technologies Portal project, not forgetting Rapiro, the little robot who speaks Welsh:


The children also shared their story with Radio Cymru:

Post Cyntaf : – at 1:16:25.

And the BBC News programme on S4C :

And there were many positive comments on Twitter :