SPEECH-COCO: 600k Visually Grounded Spoken Captions Aligned to MSCOCO Data Set
William Havard Laurent Besacier Olivier Rosec
cs.CL



[
    Tobias Zentel^1, Viviane Overbeck^2, Dirk Michalik^2, Oliver Kühn^1, Ralf Ludwig^2
    December 30, 2023
======================================================================================





This paper presents an augmentation of MSCOCO dataset where speech is added to image and text. Speech captions are generated using text-to-speech (TTS) synthesis resulting in 616,767 spoken captions (more than 600h) paired with
images. Disfluencies and speed perturbation are added to the signal in order to sound more natural. Each speech signal (WAV) is paired with a JSON file containing exact timecode for each word/syllable/phoneme in the spoken caption. Such a corpus could be used for Language and Vision (LaVi) tasks including speech input or output instead of text.  Investigating multimodal learning schemes for unsupervised speech pattern discovery is also possible with this corpus, as demonstrated by a preliminary study conducted on a subset of the corpus (10h, 10k spoken captions).











§ INTRODUCTION


During the past few years, there has been an increasing interest in research gathering language and vision (LaVi) communities. This trend can be explained by the availability of multimodal corpora such as Flickr30k <cit.>  or MSCOCO <cit.>, containing images and their captions in natural language text. LaVi systems also have benefited from the introduction of neural encoder-decoder approaches <cit.> that allow text to be generated from images or speech (or vice-versa), or to learn  joint embeddings of images and text <cit.>.

After the pioneering work done at MIT 15 years ago <cit.>, these recent advances   have also fueled fundamental research in (grounded) language acquisition and understanding (linguistics, cognitive science, autonomous robotics) as well as in more applied research to solve tasks such as image captioning <cit.> or visual question answering <cit.>.

While many benchmark image datasets have been designed to assess the quality of machine-generated image descriptions (for a survey see <cit.>), speech modality  has been less focused on, probably because of the lack of large corpora for conducting such studies. In fact, except the augmentation of Flickr8k dataset (by collecting a corpus of 40,000 spoken captions using Amazon Mechanical Turk - AMT) proposed by <cit.> which lead to the following research papers <cit.>,  very few researches on spoken language and vision were conducted so far. 




	Paper contributions.   



	
	
	This paper proposes a dataset that is an order of magnitude bigger than what is already available (600k spoken captions instead of 40k in  <cit.>). Our dataset  is built on top of MSCOCO <cit.> and contains more than 600,000  spoken captions (we will refer to it as SPEECH-COCO in the rest of this paper).
	We believe that this corpus may be useful for further Language and Vision (LaVi) tasks including speech input or output instead of text.  
	The data set is made available online[<https://zenodo.org/record/4282267>].
	Moreover, speech data is perfectly annotated (does not rely on error-prone forced alignment) since the annotations are produced during the TTS process itself (at word, syllable and phone level).
		



	
	Paper outline. 
	
	


	This paper is organized as following. In section 2, we quickly review existing corpora usable for visually grounded language acquisition and motivates the choice of MSCOCO as a starting point. In section 3, we present our general methodology and describe the spoken caption generation itself while section 4 presents some analysis on SPEECH-COCO as well as its first use for an unsupervised word discovery task. Finally, section 5 concludes this work and gives some perspectives.

	


§ EXISTING CORPORA OF VISUALLY GROUNDED SPEECH


	
	
	
	Flickr30K <cit.> (an extension of Flickr8K <cit.>) and MSCOCO <cit.> are now widely used in LaVi community. We can also mention the Visual Genome dataset, an ongoing effort to connect structured image concepts to language <cit.>. For a broader survey on image captioning datasets, the reader may refer to <cit.>. 
	
	Flickr8K and Flickr30K contain images from Flickr with  approximately 8,000 and 30,000 images, respectively. The images in these two datasets were selected through user queries for specific objects and actions. Both contain five descriptions per image which were collected using a crowdsourcing platform (AMT).

The MSCOCO dataset currently consists of 123,287 images with five different descriptions per image. Images in this dataset are annotated for 80 object categories and bounding boxes around all instances in one of these categories are available for all images. The MSCOCO dataset has been widely used for automatic image captioning. Several extensions of MSCOCO are currently under development, including the addition of questions&answers  for Visual Question Answering (VQA) task[<http://www.visualqa.org>] or FOIL-COCO (Find One mismatch between Image and Language caption) which consists of images associated with incorrect captions to challenge existing LaVi models[<https://foilunitn.github.io>].
	
	Concerning spoken captions, AMT recordings were obtained from Flickr8K by <cit.> but only 40k captions are made available online[<https://groups.csail.mit.edu/sls/downloads/flickraudio/>]. In addition, time-coded annotations are obtained after alignment of speech data with transcripts through (error-prone) automatic forced-alignment. Very recently, spoken captions for MSCOCO were generated using Google TTS by <cit.>. However, only one TTS voice was used limiting the speaker variability.
	
	
	


§ SPEECH-COCO: ADDING SPOKEN CAPTIONS TO MSCOCO



	

 §.§ Our Starting Point:  MSCOCO


We used Microsoft's Common Objects in Context (MSCOCO) <cit.> training and validation datasets as our starting point. In MSCOCO, each image is described by at least five descriptions written by humans. The images contain 91 common object categories (e.g. dog, elephant, bird, car, bicycle, air plane, etc.) from 11 super-categories (Animal, Vehicle, etc.), with 82 of them having more than 5K labelled instances. In total there are 123,287 images with captions (82,783 for training and 40,504 for validation). The test set is not available for download since it is used on an evaluation server for continuous benchmarking of image captioning systems. Consequently, 616,767 captions from 123,287 images are available for download.

	

 §.§ Spoken Captions Generation


Synthetic speech was generated for each caption using Voxygen[<https://www.voxygen.fr>], a commercial speech synthesis system, for 4 different UK voices (Paul, Elizabeth, Judith and Bronwen) and 4 different US voices (Phil, Bruce, Amanda and Jenny). It is important to note that this is corpus-based  concatenative speech synthesis <cit.> and not parametric synthesis. So, for each speaker's voice, speech utterances are generated by concatenation of units mined from a large speech corpus (generally around 3000 sentences/speaker). This means that despite having little intra-speaker variability in our speech data, there is a realistic level of inter-speaker variability, as opposed to the small corpus proposed in <cit.>.

On average, each caption comprises 10.79 tokens. The WAV files are on average 3.52 second long. 


	

 §.§ Adding Variability


First, we applied speed perturbation on the spoken captions to introduce intra-speaker variability in the dataset. For this, we used the tempo function of Sox[<http://sox.sourceforge.net/sox.html>] audio manipulation tool. This simple processing only changes speech rate while trying to keep the same pitch and spectral enveloppe. Our recordings were either accelerated (speed x 1.1), slowed down (speed x 0.9) or kept unchanged with equal probability of event.

Second, we added disfluencies to some of the captions so that they would sound more natural. We chose to only include fillers (such as "um", "uh", "er", "huh", "oh" and "ah"). It was shown that fillers often occur when speakers have to face an heavy processing load (when describing an image for example) and that they also act as coordinators <cit.>. Thus, adding fillers to some captions is legitimate and makes the corpus more realistic. The probability of adding a filler to any given caption was set to 0.3. The fillers were either added at the beginning, at the end or in the middle of a caption with equal probability of event. 




§ SPOKEN CORPUS ANALYSIS



	

 §.§ Metadata and scripts


We adopted the following naming convention for both the WAV and JSON files:


imageID_captionID_Speaker_DisfluencyPosition_Speed



Each WAV file is paired with a JSON file containing various information: timecode of each word in the caption, name of the speaker, name of the WAV file, etc. The JSON files have the following data structure:
[basicstyle=88]	

	"duration": float, 
	"speaker": string, 
	"synthesisedCaption": string,
	"timecode": list, 
	"speed": float, 
	"wavFilename": string, 
	"captionID": int, 
	"imgID": int, 
	"disfluency": list




We also created a Python script[<https://github.com/William-N-Havard/SpeechCoco>] which handles the metadata, so that the user can easily make use of the corpus. The script has the following features: 


	
  * Aggregate all the information in the JSON files into a single SQLite database
	
  * Find captions according to specific filters (name, gender and nationality of the speaker, disfluency position, speed, duration, and words in the caption). The script automatically builds the SQLite query. The user can also provide his own SQLite query.
	
  * Find all the captions belonging to a specific image
	
  * Parse the timecodes and have them structured
	
  * Get the words, syllables and phonemes timecodes 
	
  * Convert the timecodes to Praat TextGrid files (see Figure <ref>)




	

 §.§ Analysis of intra and inter speaker variability


To be sure that our corpus is realistic enough, we computed inter and intra speaker variability measures on a subset of 100 captions corresponding to 20 images and added 2 additional voices to our 8 synthetic voices for these captions: a real voice (William) and Google TTS (gTTS).
We then extracted words that were repeated across sentences and analyzed their intra and inter speaker variability using Dynamic Time Warping (DTW) computed for all  occurrences of the same word by the same speaker (e.g. Amanda vs Amanda) and for all the occurrences of the same word pronounced by different speakers (e.g Amanda vs. Bronwen, Amanda vs. Bruce, etc.).



As expected, intra speaker variability is lower than inter-speaker variability but we remark that there is not big differences between intra speaker variability of a real voice (William) and the intra speaker variability of a synthetic voice (Amanda for instance). Inter speaker variability is slightly greater between the real human voice (William) and the other synthetic voices, but inter speaker variability between  synthetic voices is still high, meaning our synthetic corpus should be difficult enough for tasks such as unsupervised term discovery (UTD) accross a collection of speech utterances from multiple speakers. This is what we intend to show in a preliminary experiment, in the next subsection.


	

 §.§ Unsupervised Term Discovery (UTD)


For UTD, we use the Zero Resource Toolkit (ZRTools <cit.>). ZRTools uses segmental dynamic time warping (SDTW) to discover pairs of acoustically similar audio segments, and then uses graph clustering on overlapping pairs to form a hard clustering of the discovered segments.
Replacing each discovered segment with its unique cluster label, or pseudoterm, gives us a partial, noisy transcription, or pseudotext.

To evaluate UTD performance, we used the term discovery evaluation toolkit (TDE) <cit.>. UTD was done on a subset of the corpus (10,000 captions which represent approximately 10 hours of speech) and the results are reported in Table <ref>. 

Our results confirm that the UTD task is still difficult even if our corpus is synthetic: we found very few gold tokens (low precision and even lower recall[TDE only gives three significant figures after the decimal point. Since our results are very low, there were rounded up to 0.000]). There is very little difference between the global precision and the within-speaker precision for the matching task, suggesting that the clusters mainly consist of speech segments belonging to the same speaker. Within-speaker clusters also seem to be purer than the global clusters since the within-speaker precision for the grouping task is higher than the global precision. Grouping recall indicates that speech segments which should have been in the same clusters have been assigned to different clusters. Finally, the low coverage and matching recall clearly indicate that a lot of work has to be done in order to get the most out of the available data and that SDTW alone might not be enough to fully segment speech utterances. For instance, modeling prosodic features could be of great help. 

To summarize, this experiment with an off-the-shelf toolkit, shows that our synthetic corpus of spoken captions is difficult enough for UTD task.




Table <ref> shows examples of clusters found by the UTD system along with the corresponding images of MSCOCO. As shown in Table <ref>, segments rarely match single tokens. However, Table <ref> shows that they often match frequent n-grams ("a man riding", "fire hydrant" and "skiing down") and multiword expressions (MWE) such as "a bunch of bananas". As such, adding a new metric to TDE that would assess the quality of the segmentation according to gold chunks and MWE would be interesting.



§ JAPANESE TRANSLATIONS


A further augmentation of MSCOCO was created by <cit.> where Japanese captions were collected using the same methodology as <cit.>. This corpus comprises 131,740 captions for 26,500 images. As the augmentation created by <cit.> does not provided a Japanese version for all of the captions, we used Machine Translation (MT)[Using both Excite and Google's MT systems] to translate all the available English captions to Japanese. This allows SPEECH-COCO to be used for cross-modal studies using speech, images, text and translations. 




§ CONCLUSION


In this paper, we have presented SPEECH-COCO, an extension of the MSCOCO image recognition and captioning dataset, which consists of more than 604 hours of speech. 

The addition of speech as a new modality enables SPEECH-COCO to be used in different fields of research including language acquisition, visually-grounded word discovery and keyword spotting, and semantic embedding using speech and vision.

This corpus has been used during the Jelinek Memorial Workshop on Speech and Language Technology (JSALT) 2017 jointly organized by CMU and JHU (Speaking Rosetta Stone team on  discovering grounded
linguistic units for languages without orthography).

We list below a list of topics that are as many LaVi tasks possible with SPEECH-COCO: 

	
	
	
  * spoken caption generation from images (generating speech from images), 
	
  * visually-grounded spoken term discovery,
	
	
  * cross-modal speech-image-text studies,
	
  * image generation from speech input,
	
  * simulating language documentation tasks where speech has been elicited from images,
	
  * effect of visual context on computational language acquisition,
	
  * (spoken) visual question answering,
	
  * data augmentation by adding synthetic multi-modal data  to more naturalistic (but small) corpora.




§ ACKNOWLEDGEMENTS


We thank Voxygen for providing us their TTS server with UK and US English voices which allowed us to generate all our spoken captions.
We thank Hideto Kazawa from Google for providing automatic translations into Japanese. 







IEEEtran

