{'fraction_non_alphanumeric': 0.027308264053295162, 'fraction_numerical': 0.015195727578043276, 'mean_word_length': 4.920469361147327, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SwissDial: Parallel Multidialectal Corpus of Spoken Swiss German

Swiss German is a dialect continuum whose natively acquired dialects significantly differ from the formal variety of the language. These dialects are mostly used for verbal communication and do not have standard orthography. This has led to a lack of annotated datasets, rendering the use of many NLP methods infeasible. In this paper, we introduce the first annotated parallel corpus of spoken Swiss German across 8 major dialects, plus a Standard German reference. Our goal has been to create and to make available a basic dataset for employing data-driven NLP applications in Swiss German. We present our data collection procedure in detail and validate the quality of our corpus by conducting experiments with the recent neural models for speech synthesis.


Introduction
In recent years, research in natural language processing has led to significant advancements on tasks such as sentiment analysis, question-answering, text-and speech-based machine translation, automatic speech recognition, or speech synthesis. Intelligent language systems such as voice assistants, chat bots, or AR/VR devices start to permeate many aspects of our daily lives. These novel forms of human-computer interaction require suitable content and crucially depend on the availability of powerful models along with adequate data to train them. This creates inequalities across different languages and particularly poses challenges for low-resource languages and dialects, where data of sufficient quantity and quality is often scarce.
Among the low-resources languages, Swiss German dialects are characterized by being derived from Standard German (High German, DE) with considerable differences in phonetics, vocabulary, morphology and syntax, even lacking clear boundaries and definitions. Unlike other languages, where dialect usage decreases in favor of standard variants in most social domains, Swiss German dialects are widely used in everyday life (cf. [1]). With the expansion of personalized digital media and social platforms, dialect use is growing even more. Despite this increasing demand, the obstacles posed by, for instance, lack of standard orthography, have made data collection of written text (e.g. transcripts) challenging. These difficulties in collecting consistent and clean data have led to a situation, where Switzerland is lagging behind and struggles to take full advantage of basic NLP tools.
This paper presents an annotated parallel corpus of spoken Swiss German dialects, SwissDial, for 8 different regions: Aargau (AG), Bern (BE), Basel (BS), Graubünden (GR), Luzern (LU), St. Gallen (SG), Wallis (VS) and Zürich (ZH). Our corpus consists of web-crawled sentences in High German, manual translations into Swiss German dialects and their audio recordings. Different genres and sources are represented: news sto- ries, Wikipedia articles, weather reports, short stories. The audio recordings are performed by a single speaker for each dialect. Figure 1 presents a sample from SwissDial. Our primary motivation and focus is to provide a basic dataset that would allow applicability of recent data-driven NLP models, especially for speech synthesis, and step up the ongoing research in Swiss German. To our knowledge, this is the first publicly available parallel corpus of spoken Swiss German. Our main contributions are as follows: • We present SwissDial, a parallel corpus of text and audio in 8 Swiss German dialects on designated topics. The data collection process is well-documented, allowing for transparency and augmentability. The corpus is available at https://projects.mtc.ethz.ch/ swiss-voice-data-collection.

Related Work
For various high-resource languages, there are parallel text corpora [2,3,4] and monolingual text corpora such as [5], Google News, Common Crawl that are used for the tasks of language modeling and machine translation. [6,7,8] present paired audio and text data which are widely used for automatic speech recognition and speech synthesis with various transformations. For these languages, [9] presents a parallel corpus for multilingual speech translation. However, availability of data is limited for languages containing strong dialectal variations such as Arabic, Chinese, Swiss German which come forward with their special condition where the formal variety of the language differs significantly from varieties that are acquired natively and mostly used for verbal communication. There are various datasets concerning Swiss German that allow various NLP tasks such as dialect identification [10,11], dialect machine translation [12,13], morphology generation [14], automatic speech recognition [15]. Archimob [16,17] presents a general purpose corpus of spoken Swiss German based on oral history interviews with various people from different dialects, which provides pairs of audio and text with annotated normalization and partof-speech tagging. Another resource [18], Swiss SMS corpus, provides text corpus of SMS messages. NOAH's corpus [19] presents a collection of text in various genres in Swiss dialects with manually annotated part-of-speech tags. [12] collects a various parallel written sources (High German and Swiss German) to perform machine translation by normalizing Swiss German. Recently, [20] introduced a dictionary containing forms of common words in various Swiss German dialects normalized into High German.
Most of these existing resources in Swiss German do not provide sufficient data to train end-to-end models for neural machine translation and speech synthesis. They rather provide word-level correspondences which are suboptimal for sentence level NLP due to the lack of full context and syntax. Moreover, existing datasets of spoken language do not fulfill the requirements of today's neural speech synthesizers, which ideally need clean and single speaker audio. SwissDial is thus, to our knowledge, the first available parallel multi-dialectal corpus with transcribed text and clean audio in Swiss German. The text part of our corpus is carefully designed to cover a large set of topics and lexicons providing manual and parallel translations of sentences in dialects. The audio part, paired with the corresponding text, provides clean and single speaker audio for each dialect at sentence level. Moreover, the corpus contains labeled code-mixing samples which would be valuable for code-mixing speech synthesis research. We believe that the parallel structure of our corpus can also be used to improve data efficiency in NLP tasks via transfer learning.

SwissDial Corpus Content and Creation
In the following, we present the construction and content of our corpus and its modalities. Acquisition of SwissDial for applications in end-to-end neural models has five main steps: obtaining raw data, selection of dialects and annotators, translation, recording, and post-processing.

Raw data
Swiss dialects are spoken colloquially, but only rarely used in written form. Moreover, the available written forms collected from unspecific sources generally contain inconsisten-cies within the same dialect, since there is no official standard orthography. This poses a challenge for annotators, possibly leading to disagreements with regard to the orthography of the provided text. To increase consistency and reduce ambiguity of the process, we started by collecting High German sentences to be translated by the annotators themselves.
We collected random sentences from news articles to cover a wide range of topics for good generalization. These sentences were labeled with the topic metadata of the article that they belong to. As mentioned earlier, Swiss dialects differ in vocabulary from High German and from each other. We thus crawled the internet for lists of lexical items that show variability among the dialects. We then extracted sentences from Wikipedia articles that contain each word (labeled as special). In this way, we aimed to cover vocabulary differences of dialects, while having a wide range of topics for a good generalization in various NLP tasks. Table 1 presents the topic distribution of the collected sentences in the corpus. It is important to note that significant majority of the code-switching (CS) content was the result of the random selection procedure, rather manual addition. There are two main reasons for this relatively large amount of CS content: (i) there is a high linguistic contact between English and German which results in considerable amount of word borrowing, (ii) our main sentence source is news articles that contain global topics like politics, science, technology etc, and therefore naturally contain words from English.

Selection of dialects
Swiss dialects are not clearly separated by geological borders, the variation in the regional language is rather continuous. One can separate each dialect into numerous sub-dialects even down to resolution of villages. Therefore, we had to make discretization where we aimed to represent the differentiation of the dialects as much as possible while addressing the most populated areas. Our selection motivation was to cover a range of dialects while complying with time constraints and availability of annotators. As a result, our corpus contains data from the following regions: Aargau, Bern, Basel, Graubünden, Luzern, St. Gallen, Wallis and Zürich. To represent these areas, we carried out an auditioning where we evaluated the annotator candidates based on their performance on a sample translation and pronunciation task, as well as their vocal quality features inspired by [21]. We hired one non-professional annotator for each dialect that passed all the tests to perform the translation and audio recording steps.

Text translation
We asked annotators from each dialect to translate the provided High German sentences, described in Section 3.1, to their native dialect. As mentioned earlier, Swiss dialects have different morphology together with different vocabulary and word choice. In some cases, a High German sentence or expression may not be easily translatable into dialect without sounding artificial. Therefore annotators had the freedom to skip such sentences. All the numbers, abbreviations and time expressions were translated as the annotator would read them out loud in the next step. In other words, the translation step aimed to have a one-to-one mapping between the text and the audio to-be-recorded. The foreign words, e.g. code-switching words, in the High German sentences were directly transferred as in the original language, rather than performing translation or phone mapping. Source Parallel  AG  BE  BS  GR  LU  SG  VS  ZH  Total  Animals/farming  News  130  137  135  137  137  135  137  137  134  1'089  Culture  News  81  85  87  87  86  86  87  87  86  691  Earth/Space  Wikipedia  17  18  18  18  18  18  18  18  25  151  Economics  News  60  63  63  62  63  63  63  63  234  674  Int. politics  News  140  155  154  153  155  152  155  155  151  1'230  Medicine  News  104  111  110  109  112  110  112  112  140  916  Meteorology  News  192  215  201  214  215  202  215  215

Recording
As the last step of the data collection, the annotators were asked to read out loud their translations in a quiet room, in front of a high-quality recording set-up to obtain clean recordings. We used a Neumann TLM 102 microphone with pop filter and recorded in mono at 48 kHz. The speakers were instructed to speak at a distance of about 15 cm from the microphone. We prepared a user interface that shows the annotator the translated sentences each at a time and allows recording control through keyboard. In this way, the annotators were able to prepare and control their voice and breathing for each sentence, and rest when they needed. The interface also allowed annotators to modify their translations when they notice typos or incorrect wording/expressions before recording each sentence. This can be considered as the last quality control step for the correctness of the translations. The recordings were carried out in multiple sessions, around the same time of the day, that took 1-2 hours each. This scheduling is important to have a consistent voice across all the audio samples without exhausting the annotators and their vocal chords. Table 2 presents the statistics of the collected text data.

Post-processing
After translations and recording, we performed small postprocessing on the collected data to make it more convenient for various NLP tasks. For the text data in High German, we post-processed each sentence in the corpus by spelling numeric values into words. For the dialect text, we post-processed each sentence transforming the spelling of the numbers into numeric characters. In this way, we provide two versions for each sentence in all dialects: text with numeric characters and all characters. Providing both versions is helpful to tokenize numbers in various NLP tasks. For the audio recordings, we performed a cleaning procedure where the aim was to cut off the segments at the beginning and end of the utterances that contain various noises like key pressing, breathing, mouth noises, etc. Some of the utterances contained noise during the sentence reading, rather than beginning/end, which would not be straightforward to clean. We repeated the recording step for these samples whenever it was possible, and eliminated the rest to present clean data which is significant for the speech synthesis task. Then, we down-sampled all recordings to 22050 Hz to be used in our speech synthesis experiments.

Speech Synthesis Experiments with SwissDial
With the increase in monolingual corpora, the end-to-end architectures [22,23] have shown high quality speech synthesis results. Using these methods, we performed various experiments to synthesize speech in Swiss dialects using audio-text pairs from Swiss Dial. All the experiments below are carried out with character level input representations.

Single speaker model
We implemented the well-established neural speech synthesis model [22], an encoder-decoder architecture with attention, and conducted experiments on each dialect separately. To increase the data efficiency for our low-resource set-up, we firstly trained on the German part of CSS10 [8] (16 hours) for a good initialization. The main motivation for pretraining on High German is to transfer the textual and acoustic representations and learned alignment from High German data to Swiss dialects in the tuning stage, since Swiss dialects are derived from High German. Then, we fine-tuned the pretrained model on each dialect sep-  arately to obtain a single speaker speech synthesis model. For each dialect, we held out 10% of the samples as a validation set.
We conducted a 5-scale mean opinion score (MOS) test, with 0.5 increments, for speech naturalness and quality. Fifteen native Swiss speakers from different regions were invited to participate. Randomly chosen ten utterances from a test set are presented to the participants for each dialect. Figure 2 shows the mean and deviation of MOS ratings of the participants. One has to keep in mind, that we hired non-professional speakers which naturally have, in comparison to professional speakers, much stronger deviations in quality and consistency of their pronunciation, intonation and voice control. Therefore, we suspect the differences in MOS rating between the dialects to be a result of the varying vocal quality of our non-professional speakers.

Multi-speaker-multi-dialect model
Next, we aimed to encourage sharing of model capacity across different dialects by training a single model on all dialects simultaneously. We implemented the multi-speaker model in [24], which is an extension of the previous model, and extended it with learnt dialect embeddings to support multi-dialect training. The speaker and the dialect embeddings are learnt in a similar way following [25]. We trained the speaker and dialect verification models by collecting samples from additional speakers from radio shows to enhance the capability of representations, since our dataset would only provide 8 different speakers. We held out 5% of the samples as a validation set. Different from [24], the learnt speaker and dialects embeddings are concatenated at the encoder output and the decoder input inspired by [26]. An internal subjective comparison between the multi-speaker-multi-dialect model results and the single speaker model results revealed a very similar naturalness and quality for the two models.

Code-Switching.
Lastly, we implemented the model SE-DEC [26], which is again an extension on [22], to explore the performance of our corpus in code-switching set-up with English words mixed in single Swiss dialect, BE, for showcasing. Firstly, we pretrained the model with monolingual recordings in English [7] and High German [8]. Then we fine-tuned the model using monolingual English data and the BE part of our dataset which introduces 247 code-switching samples. The MOS result for this experiment is shown in Figure 2 with the CS-BE bar. The participants were asked to rate the samples according to (i) Swiss German pronunciation, (ii) English pronunciation, (iii) naturalness and quality of the audio. As one can see in Figure 2, the resulting MOS ratings for BE with and without code-switching are almost identical, which is a very encouraging result for the use of code-switching extensions for Swiss German speech synthesis.

Conclusion
In this paper, we present SwissDial, a parallel multidialectal corpus of text and audio in 8 Swiss German dialects, by describing the collection procedure in detail. Furthermore, we validate the quality of SwissDial by presenting the results of experiments with the recent neural models for speech synthesis in single-speaker-single-dialect, multi-speaker-multi-dialect, and code-switching set-ups. Last but not least, we believe that applications on SwissDial are not limited only to speech synthesis but it can also empower further NLP research and application in Swiss German in the fields of machine translation and dialect identification.