<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Archiving and Interchange DTD v2.3 20070202//EN" "archivearticle.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="data-paper">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/frobt.2018.00010</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Code</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Speech Recognition for the iCub Platform</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Higy</surname> <given-names>Bertrand</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<uri xlink:href="http://frontiersin.org/people/u/464963"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Mereta</surname> <given-names>Alessio</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Metta</surname> <given-names>Giorgio</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<uri xlink:href="http://frontiersin.org/people/u/79905"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Badino</surname> <given-names>Leonardo</given-names></name>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<xref ref-type="corresp" rid="cor1">&#x0002A;</xref>
<uri xlink:href="http://frontiersin.org/people/u/75776"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>iCub Facility, Istituto Italiano di Tecnologia</institution>, <addr-line>Genoa</addr-line>, <country>Italy</country></aff>
<aff id="aff2"><sup>2</sup><institution>Universit&#x000E0; di Genova</institution>, <addr-line>Genoa</addr-line>, <country>Italy</country></aff>
<aff id="aff3"><sup>3</sup><institution>Advanced Concepts Team, European Space Agency</institution>, <addr-line>Noordwijk</addr-line>, <country>Netherlands</country></aff>
<aff id="aff4"><sup>4</sup><institution>Center for Translational Neurophysiology of Speech and Communication, Istituto Italiano di Tecnologia</institution>, <addr-line>Ferrara</addr-line>, <country>Italy</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Lorenzo Jamone, Queen Mary University of London, United Kingdom</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Tadahiro Taniguchi, Ritsumeikan University, Japan; Anna Pribilova, Slovak University of Technology in Bratislava, Slovakia</p></fn>
<corresp content-type="corresp" id="cor1">&#x0002A;Correspondence: Leonardo Badino, <email>leonardo.badino&#x00040;iit.it</email></corresp>
<fn fn-type="other" id="fn001"><p>Specialty section: This article was submitted to Humanoid Robotics, a section of the journal Frontiers in Robotics and AI</p></fn>
</author-notes>
<pub-date pub-type="epub">
<day>12</day>
<month>02</month>
<year>2018</year>
</pub-date>
<pub-date pub-type="collection">
<year>2018</year>
</pub-date>
<volume>5</volume>
<elocation-id>10</elocation-id>
<history>
<date date-type="received">
<day>09</day>
<month>08</month>
<year>2017</year>
</date>
<date date-type="accepted">
<day>23</day>
<month>01</month>
<year>2018</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2018 Higy, Mereta, Metta and Badino.</copyright-statement>
<copyright-year>2018</copyright-year>
<copyright-holder>Higy, Mereta, Metta and Badino</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract>
<p>This paper describes open source software (available at <uri xlink:href="https://github.com/robotology/natural-speech">https://github.com/robotology/natural-speech</uri>) to build automatic speech recognition (ASR) systems and run them within the YARP platform. The toolkit is designed (i) to allow non-ASR experts to easily create their own ASR system and run it on iCub and (ii) to build deep learning-based models specifically addressing the main challenges an ASR system faces in the context of verbal human&#x02013;iCub interactions. The toolkit mostly consists of Python, C&#x0002B;&#x0002B; code and shell scripts integrated in YARP. As additional contribution, a second codebase (written in Matlab) is provided for more expert ASR users who want to experiment with bio-inspired and developmental learning-inspired ASR systems. Specifically, we provide code for two distinct kinds of speech recognition: &#x0201C;articulatory&#x0201D; and &#x0201C;unsupervised&#x0201D; speech recognition. The first is largely inspired by influential neurobiological theories of speech perception which assume speech perception to be mediated by brain motor cortex activities. Our articulatory systems have been shown to outperform strong deep learning-based baselines. The second type of recognition systems, the &#x0201C;unsupervised&#x0201D; systems, do not use any supervised information (contrary to most ASR systems, including our articulatory systems). To some extent, they mimic an infant who has to discover the basic speech units of a language by herself. In addition, we provide resources consisting of pre-trained deep learning models for ASR, and a 2.5-h speech dataset of spoken commands, the VoCub dataset, which can be used to adapt an ASR system to the typical acoustic environments in which iCub operates.</p>
</abstract>
<kwd-group>
<kwd>automatic speech recognition</kwd>
<kwd>yarp</kwd>
<kwd>tensorflow</kwd>
<kwd>code:python</kwd>
<kwd>code:matlab</kwd>
<kwd>code:C&#x0002B;&#x0002B;</kwd>
</kwd-group>
<contract-num rid="cn01">288382, 644096</contract-num>
<contract-sponsor id="cn01">European Commission<named-content content-type="fundref-id">10.13039/501100000780</named-content></contract-sponsor>
<counts>
<fig-count count="2"/>
<table-count count="1"/>
<equation-count count="0"/>
<ref-count count="21"/>
<page-count count="6"/>
<word-count count="4369"/>
</counts>
</article-meta>
</front>
<body>
<sec id="S1" sec-type="introduction">
<label>1</label> <title>Introduction</title>
<p>Several applications use speech to give instructions to iCub, often relying on proprietary software. However, the robot operates in specific conditions where those systems may perform poorly. An open and easy-to-use system that would reliably recognize commands in this context would thus be a very desirable tool. We present here a first codebase, henceforth <italic>iCubRec</italic>, which has been built to provide such services to the community of iCub users. It allows to train and run state-of-the-art deep neural network (DNN)-based automatic speech recognition (ASR).</p>
<p>As an additional contribution, a second codebase, henceforth <italic>bioRec</italic>, allows to experiment with novel DNN-based recognition systems that share the same bio-inspired and developmental learning view that gave birth to iCub (Lungarella et al., <xref ref-type="bibr" rid="B12">2003</xref>). <italic>bioRec</italic> is self-contained and independent of <italic>iCubRec</italic>, however its DNN-based acoustic models can effortlessly be used within <italic>iCubRec</italic>.</p>
<p>Finally, in addition to the code, we are also providing resources to facilitate the implementation of a command recognizer: (i) the VoCub dataset, a dataset of registered vocal commands and (ii) pre-trained Gaussian Mixture Model (GMM)- and DNN-based acoustic models to perform recognition.</p>
<p>Our code, as well as the resources, is released under GPLv3 license. The code is available at <uri xlink:href="https://github.com/robotology/natural-speech">https://github.com/robotology/natural-speech</uri> (doi: <uri xlink:href="https://doi.org/10.5281/zenodo.1064043">10.5281/zenodo.1064043</uri>).</p>
</sec>
<sec id="S2">
<label>2</label> <title>iCubRec</title>
<sec id="S2-1">
<label>2.1</label> <title>Application and Utility</title>
<p>An ASR system for iCub typically operates in challenging conditions. We have identified three specific factors which we want the system to be robust to:
<list list-type="bullet">
<list-item><p>noise; the robot often operates in noisy environments (e.g., noisy servers and computers running, concurrent speakers, the robot itself generating noise).</p></list-item>
<list-item><p>accents; the teams working with iCub are international and the robot needs to recognize spoken commands uttered with a wide variety of foreign accents.</p></list-item>
<list-item><p>distance and movement; distant speech recognition is an important research topic in ASR and has been the focus of many recent challenges (e.g., the Chime4 challenge<xref ref-type="fn" rid="fn1"><sup>1</sup></xref>). When the speaker&#x02013;microphone distance increases, the speech signal-to-noise ratio decreases and signal distortions due to reverberation (in indoor environments) increases. A non-fixed distance, due to a moving speaker and/or microphone, adds further complexity to the task.</p></list-item>
</list></p>
<p>Although deep learning has recently produced excellent results in ASR, it still suffers the training-testing mismatched conditions problem. Proprietary ASR systems may perform poorly in the aforementioned acoustic/speech conditions mainly because such conditions are not well covered by their training datasets. We have addressed this problem by building a dataset (VoCub dataset) that covers such conditions and by providing tools to easily adapt a DNN to it.</p>
<p>Other than robust, an ASR system for iCub should be easy-to-use, open, and modular. Usability is necessary to allow all iCub mindware developers, who mostly have no ASR background, to train and run ASR on iCub. For this reason, we provide pre-trained GMM- and DNN-based acoustic models that can be used out of the box with the existing code. At the same time, we want more advanced users to easily modify and adapt the code to their own needs. This can only be done if everything is open and well modularized.</p>
</sec>
<sec id="S2-2">
<label>2.2</label> <title>Methods</title>
<p>To facilitate the understanding of the <italic>iCubRec</italic> module for non-ASR experts we provide here the definition of few basic ASR terms. A standard ASR system consists of 4 main parts: an acoustic feature extraction step which extracts spectral features from the input acoustic waveform; an acoustic model which relates the extracted features to sub-words (e.g., phonemes, such as consonants and vowels) and then words (i.e., computes the likelihood that vectors of features are generated by a candidate word); a language model, which is independent of the acoustic signals and incorporates prior knowledge about a specific language (e.g., the probability that the word &#x0201C;barks&#x0201D; follows the word &#x0201C;dog&#x0201D;); and a speech decoder which performs word recognition by computing the most probable sequence of words of the utterance, given: (a) the acoustic model; (b) the language model; (c) the dictionary, which consists of all words the system has to recognize along with their phoneme transcriptions. Acoustic modeling is usually done using a Hidden Markov Model (HMM) which is well suited for sequential data like speech. HMMs combine transition probabilities (i.e., <italic>p</italic>(<italic>s<sub>t</sub></italic> &#x0007C; <italic>s</italic><sub><italic>t</italic>&#x02013;1</sub>) where <italic>s<sub>t</sub></italic> is a phone label at time <italic>t</italic>) with observation probabilities (i.e., <italic>p</italic>(<italic>o<sub>t</sub></italic> &#x0007C; <italic>s<sub>t</sub></italic>), where <italic>o<sub>t</sub></italic> is the input vector of acoustic feature at time <italic>t</italic>). The core difference between classical GMM-HMM vs. hybrid DNN-HMM acoustic models simply resides on whether GMMs or DNNs are used to compute the observation probabilities.</p>
</sec>
<sec id="S2-3">
<label>2.3</label> <title>Code Description</title>
<p>iCubRec code is based on the Hidden Markov Model Toolkit (HTK) (Young et al., <xref ref-type="bibr" rid="B21">2015</xref>). However, as the training capabilities for DNNs are still quite limited in HTK, we also consider the alternative possibility to train a network with Tensorflow (Abadi et al., <xref ref-type="bibr" rid="B1">2015</xref>) and convert it to HTK format for use in decoding. Although in the later case the DNN is still restricted to the architectures recognized by HTK (for now, only feedforward networks with a limited set of activation functions), this gives more flexibility and control over the training process. Additionally, the use of Tensorflow allows to easily adapt a pre-trained DNN to new adaptation data.</p>
<p>The code consists of scripts for:
<list list-type="bullet">
<list-item><p>acoustic model training with GMMs</p></list-item>
<list-item><p>acoustic model training with DNNs</p></list-item>
<list-item><p>speech decoding</p></list-item>
<list-item><p>integration within YARP for online speech decoding.</p></list-item>
</list></p>
<p>iCubRec is a combination of Python 3, Perl and shell scripts, and was written for HTK 3.5 and Tensorflow 1.0.</p>
<sec id="S2-3-1">
<label>2.3.1</label> <title>GMM-Based Acoustic Modeling</title>
<p>Before the advent of DNNs, GMM-HMM systems were state-of-the-art for acoustic modeling in speech recognition. Although they are significantly outperformed by neural networks (Dahl et al., <xref ref-type="bibr" rid="B8">2012</xref>; Seltzer et al., <xref ref-type="bibr" rid="B16">2013</xref>), GMMs are still widely used if only to compute the phone labels/speech segments alignments needed to train a DNN (Dahl et al., <xref ref-type="bibr" rid="B8">2012</xref>). The folder <monospace>gmm_training</monospace> provides a set of scripts to train GMM-HMMs using HTK. These scripts are based on Keith Vertanen&#x02019;s code (Vertanen, <xref ref-type="bibr" rid="B18">2006</xref>) and allow to build models similar to the ones described by Woodland et al. (<xref ref-type="bibr" rid="B20">1994</xref>). The recipe is originally intended for TIMIT (Garofolo et al., <xref ref-type="bibr" rid="B9">1993a</xref>) and Wall Street Journal (WSJ) (Garofolo et al., <xref ref-type="bibr" rid="B10">1993b</xref>) datasets and has been adapted for the Chime4 challenge (Vincent et al., <xref ref-type="bibr" rid="B19">2016</xref>) and VoCub datasets.</p>
</sec>
<sec id="S2-3-2">
<label>2.3.2</label> <title>DNN-Based Acoustic Modeling</title>
<p>Once the speech signal has been aligned (presumably using GMM-HMMs), a DNN-based model can be trained. Two alternatives are available: (i) using the scripts in <monospace>dnn_training/htk</monospace> to train a model with HTK or (ii) using the code under <monospace>dnn_training/tf</monospace> to train the net with Tensorflow. The scripts proposed here are currently restricted to TIMIT and WSJ, but support for additional datasets will be added soon.</p>
</sec>
<sec id="S2-3-3">
<label>2.3.3</label> <title>Speech Decoding</title>
<p>With a model trained with HTK (GMM-based or DNN-based), it is then straightforward to perform recognition on a new utterance. The folder <monospace>offline_decoding</monospace> provides an example of decoding on pre-recorded data with HTK. Additionally, <monospace>export for_htk.py</monospace> shows how to easily extract the parameters of a net trained with Tensorflow and convert them into HTK format.</p>
</sec>
<sec id="S2-3-4">
<label>2.3.4</label> <title>Integration with YARP</title>
<p>All the code presented so far is meant to train and test a system offline. <monospace>yarp_decoding</monospace> folder provides the modules necessary to use an existing model within YARP and perform online recognition. A streaming service based on yarp.js<xref ref-type="fn" rid="fn2"><sup>2</sup></xref> allows to record sound from any device equipped with a microphone and a web browser. Two other modules are provided: <monospace>rctrld_yarphear_asr</monospace> which saves the recorded data in a file, and the <monospace>decoder</monospace> (based on HVite tool from HTK) for feature extraction and command decoding. The application <monospace>speechrec.xml</monospace> is available to easily run and connect all the modules.</p>
</sec>
</sec>
<sec id="S2-4">
<label>2.4</label> <title>Resources</title>
<sec id="S2-4-1">
<label>2.4.1</label> <title>The VoCub Dataset</title>
<p>Recording a dataset has two main advantages: (i) it allows to easily test the recognition system and to reliably estimate its performance in real conditions and (ii) can be used to adapt the system in order to reduce the training/testing mismatch problem. For this reasons, we have recorded examples of the commands we want to recognize within real-usage scenarios. That resulted in the VoCub dataset.<xref ref-type="fn" rid="fn3"><sup>3</sup></xref></p>
<p>The recordings consist of spoken English commands addressed to iCub. There are 103 unique commands (see Table <xref ref-type="table" rid="T1">1</xref> for some examples), composed of 62 different words. We recorded 29 speakers, 16 males and 13 females, 28 of them are non-native English speakers. We finally obtained 118 recordings from each speaker: of the 103 unique commands, 88 were recorded once, and 15 twice (corresponding to sentences containing rare words). This results in about 2&#x02009;h and 30&#x02009;min of recording in total.</p>
<table-wrap position="float" id="T1">
<label>Table 1</label>
<caption><p>Examples of the commands used in the VoCub dataset.</p></caption>
<table frame="hsides" rules="groups">
<tbody>
<tr>
<td align="left" valign="top">I will teach you a new object.</td>
</tr>
<tr>
<td align="left" valign="top">This is an octopus.</td>
</tr>
<tr>
<td align="left" valign="top">What is this?</td>
</tr>
<tr>
<td align="left" valign="top">Let me show you how to reach the car with your left arm.</td>
</tr>
<tr>
<td align="left" valign="top">Let me show you how to reach the turtle with your right arm.</td>
</tr>
<tr>
<td align="left" valign="top">There you go.</td>
</tr>
<tr>
<td align="left" valign="top">Grasp the ladybug.</td>
</tr>
<tr>
<td align="left" valign="top">Where is the car?</td>
</tr>
<tr>
<td align="left" valign="top">No, here it is.</td>
</tr>
<tr>
<td align="left" valign="top">See you soon.</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>A split of the speakers into training, validation, and test sets is proposed with 21, 4, and 4 speakers per set, respectively. The files are organized with the following convention <monospace>setid/spkrid/spkrid_cond_recid.wav</monospace>, where:
<list list-type="bullet">
<list-item><p><monospace>setid</monospace> identifies the set: <monospace>tr</monospace> for training, <monospace>dt</monospace> for validation and <monospace>et</monospace> for testing.</p></list-item>
<list-item><p><monospace>spkrid</monospace> identifies the speaker: from <monospace>001</monospace> to <monospace>021</monospace> for training, <monospace>101</monospace> to <monospace>104</monospace> for validation and <monospace>201</monospace> to <monospace>204</monospace> for testing.</p></list-item>
<list-item><p><monospace>cond</monospace> identifies the condition (see below).</p></list-item>
<list-item><p><monospace>recid</monospace> identifies the record within the condition (starting from <monospace>0</monospace> and increasing).</p></list-item>
</list></p>
<p>The commands were recorded in two different conditions, a non-static (<monospace>cond</monospace>&#x02009;&#x0003D;&#x02009;1) and a static condition (<monospace>cond</monospace>&#x02009;&#x0003D;&#x02009;2), with an equal number of recorded utterances per condition.</p>
<p>In the static condition, the speaker sat in front of two screens where the sentences to read were displayed. In the non-static condition, the commands were provided to the subject verbally through a speech synthesis system, and the subject had to repeat them while performing a secondary manual task. This secondary task was designed to be simple enough to not impede the utterance repetition task, while requiring people to move around the robot. The distance between the speaker and the microphone in this last condition ranges from 50&#x02009;cm to 3&#x02009;m.</p>
<p>We also registered a set of additional sentences for the testing group (same structure but different vocabulary) to test the recognition system for new commands not seen during training. The sentences consist of 20 new commands, pronounced by each speaker of the test set twice: once in non-static condition (<monospace>cond</monospace>&#x02009;&#x0003D;&#x02009;3) and once in static condition (<monospace>cond</monospace>&#x02009;&#x0003D;&#x02009;4).</p>
</sec>
<sec id="S2-4-2">
<label>2.4.2</label> <title>Trained Models</title>
<p>As not all the datasets used in our scripts are freely available, and in order to ease the use of our system, we provide pre-trained acoustic models that can be used out of the box. The <monospace>models/README.md</monospace> file contains links to download GMM-based models trained on WSJ, Chime4 and VoCub datasets, and DNN-based models trained on TIMIT and WSJ. Additional DNN-based models will be added in the future. Further details about the different models and the precise training procedure can be found in the same file.</p>
</sec>
</sec>
<sec id="S2-5">
<label>2.5</label> <title>Example of Use</title>
<p>A good demonstration of the capabilities of the code presented so far is given in the file <monospace>icubrec/DEMO.md</monospace>. In a few simple steps, the user is shown how to perform offline decoding on the VoCub dataset with a pre-trained model. This example is accessible to novice ASR users and does not require any proprietary dataset.</p>
<p>A more in-depth example is given in <monospace>icubrec/TUTORIAL.md</monospace>, which provides detailed instruction on how to train a full ASR system on the WSJ dataset. This tutorial goes through all the main steps: training of a GMM-based acoustic model, computation of the alignments, training of a DNN-based acoustic model using those alignments, and finally decoding of the test sentences.</p>
</sec>
</sec>
<sec id="S3">
<label>3</label> <title>bioRec</title>
<sec id="S3-1">
<label>3.1</label> <title>Application and Utility</title>
<p>Our module for bio- and cognitive science-inspired ASR is composed of two distinct parts serving different purposes: <italic>Articulatory Phone Recognition</italic> and <italic>Unsupervised/Developmental ASR</italic>.</p>
<sec id="S3-1-1">
<label>3.1.1</label> <title>Articulatory Phone Recognition</title>
<p>This part includes modules <monospace>phonerec</monospace> and <monospace>pce_phonerec</monospace>, which build <italic>articulatory</italic> phone recognition systems. A phone recognition system recognizes the sequence of phones of an utterance. It can roughly be identified as an ASR system without language model and dictionary. <italic>Articulatory</italic> phone recognition uses prior information about how the vocal tract moves when producing speech sounds. This <italic>articulatory</italic> view is strongly motivated by influential neurobiological theories of speech perception that assume a contribution of the brain motor cortex to speech perception (Pulverm&#x000FC;ller and Fadiga, <xref ref-type="bibr" rid="B13">2010</xref>) and have been shown to outperform strong DNN-based baselines where no prior articulatory information is used (see, e.g., Badino et al. (<xref ref-type="bibr" rid="B5">2016</xref>)).</p>
</sec>
<sec id="S3-1-2">
<label>3.1.2</label> <title>Unsupervised/Developmental ASR</title>
<p>The second part of <italic>bioRec</italic>, <monospace>zerorchallenge</monospace>, builds &#x0201C;unsupervised&#x0201D; ASR systems. Most recognition systems, including the <italic>articulatory</italic> systems, are trained on supervised data, where training utterances are associated to phonetic transcriptions, and the inventory of phones is given. This learning setting is far easier than the learning setting of an infant who has to acquire her native language and has to discover the basic units of the language on her own. In order to better understand how an infant can acquire the phone inventory during development from raw &#x0201C;unsupervised&#x0201D; utterances, we have created &#x0201C;unsupervised&#x0201D; ASR systems that were submitted and evaluated at the 1st Zero Resource Speech Challenge (ZRS challenge) (Versteegh et al., <xref ref-type="bibr" rid="B17">2015</xref>).</p>
</sec>
</sec>
<sec id="S3-2">
<label>3.2</label> <title>Methods</title>
<sec id="S3-2-1">
<label>3.2.1</label> <title>Articulatory Phone Recognition</title>
<p>The <italic>articulatory</italic> phone recognition module consists of 2 parts depending on how speech production information is represented:
<list list-type="bullet">
<list-item><p><monospace>phonerec</monospace>; speech production is represented in the form of actual measurements of vocal tract movements, collected through instruments such as the electromagnetic articulograph (Richmond et al., <xref ref-type="bibr" rid="B14">2011</xref>);</p></list-item>
<list-item><p><monospace>pce_phonerec</monospace>; vocal tract movements are initially described by discrete linguistic features and actual measurements are not used.</p></list-item>
</list></p>
<p><monospace>phonerec</monospace>: in this module, prior information of speech production is built by learning, during training, an acoustic-to-articulatory mapping that allows to recover vocal tract movements, i.e., reconstructed articulatory features (AFs), from the acoustic signal (Badino et al., <xref ref-type="bibr" rid="B3">2012</xref>, <xref ref-type="bibr" rid="B5">2016</xref>). The reconstructed AFs are then appended to the usual input acoustic vector of the DNN that computes phone state posterior probabilities, i.e., the acoustic model DNN (see Figure <xref ref-type="fig" rid="F1">1</xref>, which shows the simplest strategy). Additionally, our code allows to apply autoencoder (AE)-based transformations to the original AFs in order to improve performance. AEs are a special kind of DNN that attempts to reconstruct its input after encoding it, typically through a lossy encoding. More details and evaluation results can be found in Badino et al. (<xref ref-type="bibr" rid="B5">2016</xref>).</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>An example of articulatory phone recognition. Here, the simplest strategy available in <monospace>phonerec</monospace> is shown. o<sub>t</sub> is a vector of acoustic features, while s<sub>t</sub> is a phone state.</p></caption>
<graphic xlink:href="frobt-05-00010-g001.tif"/>
</fig>
<p><monospace>pce_phonerec</monospace>: in this module, AFs are derived (through a DNN) from linguistic discrete features (referred to as phonetic context embedding). They are used as secondary target for the acoustic model DNN within a multi-task learning (MTL) strategy (Caruana, <xref ref-type="bibr" rid="B7">1997</xref>). This strategy forces the DNN to learn a motor representation without the need for time-consuming collection of actual articulatory data. Our approach outperforms strong alternative MTL-based approaches (Badino, <xref ref-type="bibr" rid="B2">2016</xref>).</p>
</sec>
<sec id="S3-2-2">
<label>3.2.2</label> <title>Unsupervised/Developmental ASR</title>
<p><monospace>zerorchallenge</monospace> is the module building the unsupervised/developmental ASR systems we submitted to Task1 of the ZRS challenge at Interspeech 2015 (Versteegh et al., <xref ref-type="bibr" rid="B17">2015</xref>). The goal of the challenge was to compare systems that create new acoustic representations that can discriminate examples of minimal pairs, i.e., words differing only in one phoneme (e.g., &#x0201C;hat&#x0201D; vs. &#x0201C;had&#x0201D;), while identifying as a single entity different examples of a same word. Specifically, we focused on extracting discrete/symbolic representations, which equals to automatically discovering the inventory of (phone-like) sub-words of a language. Our core strategy is based on AEs (Badino et al., <xref ref-type="bibr" rid="B4">2014</xref>), as shown in Figure <xref ref-type="fig" rid="F2">2</xref>. The provided scripts build 2 novel systems, one based on binarized AEs and one on Hidden Markov Model Encoders (HMM-Encoders) (Badino et al., <xref ref-type="bibr" rid="B6">2015</xref>).</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Overview of the AE-based approach to sub-word learning.</p></caption>
<graphic xlink:href="frobt-05-00010-g002.tif"/>
</fig>
<p>A binarized AE is an AE whose encoding layer nodes are binary. At each time step, it transforms a vector of real-valued acoustic features into a vector of binary units which in turn is associated to a positive integer corresponding to a discovered specific sub-word.</p>
<p>The HMM-Encoder combines an AE with a HMM.<xref ref-type="fn" rid="fn4"><sup>4</sup></xref> An approach solely based on AEs ignores the sequential nature of speech and inter-sub-word dependencies. The HMM-Encoder was proposed to specifically address these potential weaknesses.</p>
</sec>
</sec>
<sec id="S3-3">
<label>3.3</label> <title>Code Description and Example of Use</title>
<p>All code is written in Matlab and uses the Parallel Processing Toolbox to allow fast DNN training with GPUs. All modules were tested in Matlab 2013a and 2015a.</p>
<sec id="S3-3-1">
<label>3.3.1</label> <title>Articulatory Phone Recognition</title>
<p><monospace>phonerec</monospace>: the file <monospace>ploclassify.m</monospace> allows to train and test articulatory phone recognition systems. It requires the <monospace>inivar.m</monospace> configuration file where it is possible to define, e.g., the type of AFs through <monospace>cmotortype</monospace> (e.g., AE-transformed AFs or &#x0201C;plain&#x0201D; AFs), the hyperparameters of the acoustic model DNN (<monospace>parnet_classifier</monospace>), and of the acoustic-to-articulatory mapping DNN (<monospace>parnet_regress</monospace>).</p>
<p>The folder <monospace>demo</monospace> contains 2 examples to build and evaluate a baseline (<monospace>audio1_motor0_rec0</monospace>) and an articulatory phone recognition system (<monospace>audio1_motor3_rec1</monospace>) on the mngu0 dataset (Richmond et al., <xref ref-type="bibr" rid="B14">2011</xref>). The dataset used here (available at <uri xlink:href="https://zenodo.org/record/836692/files/bioRec_Resources.tar.gz">https://zenodo.org/record/836692/files/bioRec_Resources.tar.gz</uri>, under/<monospace>bioRec_Resources/phonerec_mngu0/</monospace>) is a preprocessed version of the mngu0 dataset.</p>
<p><monospace>pce_phonerec</monospace>: this articulatory phone recognition system is trained and evaluated by running <monospace>mtkpr_pce.m</monospace>. It can be compared with an alternative MTL-based strategy proposed by Microsoft researchers (Seltzer and Droppo, <xref ref-type="bibr" rid="B15">2013</xref>), by running the script <monospace>mtkpr_baseline.m</monospace>. All systems are trained and tested on the TIMIT dataset, which unfortunately is not freely available. Training on different datasets would require some small dataset-dependent modifications to the look-up table used to extract discrete linguistic features from phone names.</p>
<p>We have created a Python&#x02009;&#x0002B;&#x02009;Tensorflow implementation the DNN training proposed in this module which will be soon available.</p>
</sec>
<sec id="S3-3-2">
<label>3.3.2</label> <title>Unsupervised/Developmental ASR</title>
<p>We provide scripts that receive as input one of the datasets provided by the ZRS challenge, train one of the unsupervised ASR systems (on the training utterances), and return the testing utterances in a new discrete representation with a positive integer at each time step. We additionally provide the 3 datasets from the ZRS challenge already transformed to be processed by our scripts (available at <uri xlink:href="https://zenodo.org/record/836692/files/bioRec_Resources.tar.gz">https://zenodo.org/record/836692/files/bioRec_Resources.tar.gz</uri>, under/<monospace>bioRec_Resources/zerochallenge/</monospace>). The output format allows to evaluate the output file with the tools provided for the challenge (Versteegh et al., <xref ref-type="bibr" rid="B17">2015</xref>).</p>
</sec>
<sec id="S3-3-3">
<label>3.3.3</label> <title>Utilities</title>
<p>All utilities used by the <monospace>phonerec</monospace>, <monospace>pce_phonerec</monospace>, and <monospace>zerorchallenge</monospace> are in:
<list list-type="bullet">
<list-item><p><monospace>netutils</monospace>: contains functions to train and run DNNs, e.g., standard DNN training, Deep Belief Network-based DNN pretraining (Hinton et al., <xref ref-type="bibr" rid="B11">2006</xref>), MTL training, DNN forward pass (i.e., to evaluate a DNN), deep autoencoder training, including training of some AEs we have recently proposed specifically for speech.</p></list-item>
<list-item><p><monospace>utils</monospace>: this folder contains all utilities that do not pertain to DNNs. These include: data loading and normalization, phone language models computation, Viterbi-based phone decoding, phone error rate computation, and analysis of error.</p></list-item>
</list></p>
</sec>
</sec>
</sec>
<sec id="S4">
<label>4</label> <title>Conclusion</title>
<p>In this paper, we have described the codebase that allows to easily train deep neural network-based automatic speech recognition systems and run them within YARP. As an additional contribution, we provide tools to experiment with recognition systems that are inspired by recent influential theories of speech perception and with systems that partly mimic the learning setting of an infant who has to learn the basic speech units of a language.</p>
</sec>
<sec id="S5">
<title>Ethics Statement</title>
<p>This study was carried out in accordance with the recommendations of the &#x0201C;Comitato Etico per la Sperimentazione con l&#x02019;Essere Umano della ASL 3 di Genova&#x0201D; with written informed consent from all subjects. All subjects gave written informed consent in accordance with the Declaration of Helsinki. The protocol was approved by the &#x0201C;Comitato Etico per la Sperimentazione con l&#x02019;Essere Umano della ASL 3 di Genova.&#x0201D;</p>
</sec>
<sec id="S6" sec-type="author-contributor">
<title>Author Contributions</title>
<p>Conceived and designed the ASR systems: LB, GM, BH, and AM. Wrote the code: LB, BH, and AM. Wrote the paper: BH and LB.</p>
</sec>
<sec id="S7">
<title>Conflict of Interest Statement</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest. The handling editor declared a past co-authorship with one of the authors, GM.</p>
</sec>
</body>
<back>
<fn-group>
<fn fn-type="financial-disclosure">
<p><bold>Funding.</bold> The authors acknowledge the support of the European Commission project POETICON&#x0002B;&#x0002B; (grant agreement No. 288382) and ECOMODE (grant agreement No. 644096).</p>
</fn>
</fn-group>
<sec id="S8" sec-type="supplementary-material">
<title>Supplementary Material</title>
<p>The Supplementary Material for this article can be found online at <uri xlink:href="http://www.frontiersin.org/articles/10.3389/frobt.2018.00010/full&#x00023;supplementary-material">http://www.frontiersin.org/articles/10.3389/frobt.2018.00010/full&#x00023;supplementary-material</uri>.</p>
<supplementary-material xlink:href="Presentation_1.ZIP" id="SM1" mimetype="applicationn/ZIP" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="B1"><citation citation-type="other"><person-group person-group-type="author"><name><surname>Abadi</surname> <given-names>M.</given-names></name> <name><surname>Agarwal</surname> <given-names>A.</given-names></name> <name><surname>Barham</surname> <given-names>P.</given-names></name> <name><surname>Brevdo</surname> <given-names>E.</given-names></name> <name><surname>Chen</surname> <given-names>Z.</given-names></name> <name><surname>Citro</surname> <given-names>C.</given-names></name> <etal/></person-group> (<year>2015</year>). <source>TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems</source>. arXiv preprint arXiv:1603.04467.</citation></ref>
<ref id="B2"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Badino</surname> <given-names>L.</given-names></name></person-group> (<year>2016</year>). <article-title>&#x0201C;Phonetic context embeddings for DNN-HMM phone recognition,&#x0201D;</article-title> in <source>Proc. of Interspeech</source> (<publisher-loc>San Francisco, CA</publisher-loc>).</citation></ref>
<ref id="B3"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Badino</surname> <given-names>L.</given-names></name> <name><surname>Canevari</surname> <given-names>C.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name></person-group> (<year>2012</year>). <article-title>&#x0201C;Deep-level acoustic-to-articulatory mapping for DBN-HMM based phone recognition,&#x0201D;</article-title> in <source>Proc. of IEEE SLT</source> (<publisher-loc>Miami, FL</publisher-loc>).</citation></ref>
<ref id="B4"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Badino</surname> <given-names>L.</given-names></name> <name><surname>Canevari</surname> <given-names>C.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name></person-group> (<year>2014</year>). <article-title>&#x0201C;An auto-encoder based approach to unsupervised learning of subword units,&#x0201D;</article-title> in <source>Proc. of IEEE ICASSP</source> (<publisher-loc>Florence, Italy</publisher-loc>).</citation></ref>
<ref id="B5"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Badino</surname> <given-names>L.</given-names></name> <name><surname>Canevari</surname> <given-names>C.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name></person-group> (<year>2016</year>). <article-title>Integrating articulatory data in deep neural network-based acoustic modeling</article-title>. <source>Comput. Speech Lang.</source> <volume>36</volume>, <fpage>173</fpage>&#x02013;<lpage>195</lpage>.<pub-id pub-id-type="doi">10.1016/j.csl.2015.05.005</pub-id></citation></ref>
<ref id="B6"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Badino</surname> <given-names>L.</given-names></name> <name><surname>Mereta</surname> <given-names>A.</given-names></name> <name><surname>Rosasco</surname> <given-names>L.</given-names></name></person-group> (<year>2015</year>). <article-title>&#x0201C;Discovering discrete subword units with binarized autoencoders and hidden-Markov-model encoders,&#x0201D;</article-title> in <source>Proc. of Interspeech</source> (<publisher-loc>Dresden, Germany</publisher-loc>).</citation></ref>
<ref id="B7"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Caruana</surname> <given-names>R.</given-names></name></person-group> (<year>1997</year>). <article-title>Multitask learning</article-title>. <source>Mach. Learn.</source> <volume>28</volume>, <fpage>41</fpage>&#x02013;<lpage>75</lpage>.<pub-id pub-id-type="doi">10.1023/A:1007379606734</pub-id></citation></ref>
<ref id="B8"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dahl</surname> <given-names>G.</given-names></name> <name><surname>Yu</surname> <given-names>D.</given-names></name> <name><surname>Deng</surname> <given-names>L.</given-names></name> <name><surname>Acero</surname> <given-names>A.</given-names></name></person-group> (<year>2012</year>). <article-title>Context-dependent pre-trained deep neural networks for large-vocabulary speech recognition</article-title>. <source>IEEE Trans. Audio Speech Lang. Processing</source> <volume>20</volume>, <fpage>30</fpage>&#x02013;<lpage>42</lpage>.<pub-id pub-id-type="doi">10.1109/TASL.2011.2134090</pub-id></citation></ref>
<ref id="B9"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Garofolo</surname> <given-names>J. S.</given-names></name> <name><surname>Lamel</surname> <given-names>L. F.</given-names></name> <name><surname>Fisher</surname> <given-names>W. M.</given-names></name> <name><surname>Fiscus</surname> <given-names>J. G.</given-names></name> <name><surname>Pallett</surname> <given-names>D. S.</given-names></name> <name><surname>Dahlgren</surname> <given-names>N. L.</given-names></name> <etal/></person-group> (<year>1993a</year>). <source>TIMIT Acoustic-Phonetic Continuous Speech Corpus LDC93s1. Web Download</source>. <publisher-loc>Philadelphia</publisher-loc>: <publisher-name>Linguistic Data Consortium</publisher-name>.</citation></ref>
<ref id="B10"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Garofolo</surname> <given-names>J.</given-names></name> <name><surname>Graff</surname> <given-names>D.</given-names></name> <name><surname>Paul</surname> <given-names>D.</given-names></name> <name><surname>Pallett</surname> <given-names>D.</given-names></name></person-group> (<year>1993b</year>). <source>CSR-I (WSJ0) Complete LDC93s6a. Web Download</source>. <publisher-loc>Philadelphia</publisher-loc>: <publisher-name>Linguistic Data Consortium</publisher-name>.</citation></ref>
<ref id="B11"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hinton</surname> <given-names>G.</given-names></name> <name><surname>Osindero</surname> <given-names>S.</given-names></name> <name><surname>Teh</surname> <given-names>Y.</given-names></name></person-group> (<year>2006</year>). <article-title>A fast learning algorithm for deep belief nets</article-title>. <source>Neural Comput.</source> <volume>18</volume>, <fpage>1527</fpage>&#x02013;<lpage>1554</lpage>.<pub-id pub-id-type="doi">10.1162/neco.2006.18.7.1527</pub-id><pub-id pub-id-type="pmid">16764513</pub-id></citation></ref>
<ref id="B12"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lungarella</surname> <given-names>M.</given-names></name> <name><surname>Metta</surname> <given-names>G.</given-names></name> <name><surname>Pfeifer</surname> <given-names>R.</given-names></name> <name><surname>Sandini</surname> <given-names>G.</given-names></name></person-group> (<year>2003</year>). <article-title>Developmental robotics: a survey</article-title>. <source>Connect. Sci.</source> <volume>15</volume>, <fpage>151</fpage>&#x02013;<lpage>190</lpage>.<pub-id pub-id-type="doi">10.1080/09540090310001655110</pub-id></citation></ref>
<ref id="B13"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pulverm&#x000FC;ller</surname> <given-names>F.</given-names></name> <name><surname>Fadiga</surname> <given-names>L.</given-names></name></person-group> (<year>2010</year>). <article-title>Active perception: sensorimotor circuits as a cortical basis for language</article-title>. <source>Nat. Rev. Neurosci.</source> <volume>11</volume>, <fpage>351</fpage>&#x02013;<lpage>360</lpage>.<pub-id pub-id-type="doi">10.1038/nrn2811</pub-id></citation></ref>
<ref id="B14"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Richmond</surname> <given-names>K.</given-names></name> <name><surname>Hoole</surname> <given-names>P.</given-names></name> <name><surname>King</surname> <given-names>S.</given-names></name></person-group> (<year>2011</year>). <article-title>&#x0201C;Announcing the electromagnetic articulography (day 1) subset of the mngu0 articulatory corpus,&#x0201D;</article-title> in <source>Proc. of Interpseech</source> (<publisher-loc>Florence, Italy</publisher-loc>).</citation></ref>
<ref id="B15"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Seltzer</surname> <given-names>M.</given-names></name> <name><surname>Droppo</surname> <given-names>J.</given-names></name></person-group> (<year>2013</year>). <article-title>&#x0201C;Multi-task learning in deep neural networks for improved phoneme recognition,&#x0201D;</article-title> in <source>Proc. of ICASSP</source> (<publisher-loc>Vancouver, BC</publisher-loc>).</citation></ref>
<ref id="B16"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Seltzer</surname> <given-names>M.</given-names></name> <name><surname>Yu</surname> <given-names>D.</given-names></name> <name><surname>Wan</surname> <given-names>Y.</given-names></name></person-group> (<year>2013</year>). <article-title>&#x0201C;An investigation of deep neural networks for noise robust speech recognition,&#x0201D;</article-title> in <source>Proc. of ICASSP</source> (<publisher-loc>Vancouver, BC</publisher-loc>).</citation></ref>
<ref id="B17"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Versteegh</surname> <given-names>M.</given-names></name> <name><surname>Thiolliere</surname> <given-names>R.</given-names></name> <name><surname>Schatz</surname> <given-names>T.</given-names></name> <name><surname>Cao</surname> <given-names>X. N.</given-names></name> <name><surname>Anguera</surname> <given-names>X.</given-names></name> <name><surname>Jansen</surname> <given-names>A.</given-names></name> <etal/></person-group> (<year>2015</year>). <article-title>&#x0201C;The zero resource speech challenge 2015,&#x0201D;</article-title> in <source>Proc. of Interspeech</source> (<publisher-loc>Dresden, Germany</publisher-loc>).</citation></ref>
<ref id="B18"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Vertanen</surname> <given-names>K.</given-names></name></person-group> (<year>2006</year>). <source>Baseline WSJ Acoustic Models for HTK and Sphinx: Training Recipes and Recognition Experiments. Technical Report</source>. <publisher-loc>Cambridge, UK</publisher-loc>: <publisher-name>Cavendish Laboratory</publisher-name>.</citation></ref>
<ref id="B19"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Vincent</surname> <given-names>E.</given-names></name> <name><surname>Watanabe</surname> <given-names>S.</given-names></name> <name><surname>Nugraha</surname> <given-names>A. A.</given-names></name> <name><surname>Barker</surname> <given-names>J.</given-names></name> <name><surname>Marxer</surname> <given-names>R.</given-names></name></person-group> (<year>2016</year>). <article-title>An analysis of environment, microphone and data simulation mismatches in robust speech recognition</article-title>. <source>Comput. Speech Lang.</source> <volume>46</volume>, <fpage>535</fpage>&#x02013;<lpage>557</lpage>.<pub-id pub-id-type="doi">10.1016/j.csl.2016.11.005</pub-id></citation></ref>
<ref id="B20"><citation citation-type="confproc"><person-group person-group-type="author"><name><surname>Woodland</surname> <given-names>P.</given-names></name> <name><surname>Odell</surname> <given-names>J.</given-names></name> <name><surname>Valtchev</surname> <given-names>V.</given-names></name> <name><surname>Young</surname> <given-names>S.</given-names></name></person-group> (<year>1994</year>). <article-title>&#x0201C;Large vocabulary continuous speech recognition using HTK,&#x0201D;</article-title> in <conf-name>IEEE International Conference on Acoustics, Speech, and Signal Processing, 1994. ICASSP-94</conf-name>, Vol. <volume>ii</volume> (<conf-loc>Adelaide, SA</conf-loc>), <fpage>II/125</fpage>&#x02013;<lpage>II/128</lpage>.</citation></ref>
<ref id="B21"><citation citation-type="book"><person-group person-group-type="author"><name><surname>Young</surname> <given-names>S.</given-names></name> <name><surname>Evermann</surname> <given-names>G.</given-names></name> <name><surname>Gales</surname> <given-names>M.</given-names></name> <name><surname>Hain</surname> <given-names>T.</given-names></name> <name><surname>Kershaw</surname> <given-names>D.</given-names></name> <name><surname>Liu</surname> <given-names>X.</given-names></name> <etal/></person-group> (<year>2015</year>). <source>The HTK Book (for HTK Version 3.5)</source>. <publisher-name>Cambridge University Engineering Department</publisher-name>.</citation></ref>
</ref-list>
<fn-group>
<fn id="fn1"><p><sup>1</sup><uri xlink:href="http://spandh.dcs.shef.ac.uk/chime_challenge/chime2016/">http://spandh.dcs.shef.ac.uk/chime_challenge/chime2016/</uri>.</p></fn>
<fn id="fn2"><p><sup>2</sup><uri xlink:href="https://github.com/robotology/yarp.js">https://github.com/robotology/yarp.js</uri>.</p></fn>
<fn id="fn3"><p><sup>3</sup>Freely available at <uri xlink:href="https://robotology.github.io/natural-speech/vocub/">https://robotology.github.io/natural-speech/vocub/</uri>.</p></fn>
<fn id="fn4"><p><sup>4</sup>Our HMM training code is a modified version of code from K. Murphy&#x02019;s BayesianNet toolbox, available at <uri xlink:href="https://github.com/bayesnet/bnt">https://github.com/bayesnet/bnt</uri>.</p>
</fn>
</fn-group>
</back>
</article>