F innish Dialect Identification: The Effect of Audio and Text (2021)

Abstract: Finnish is a language with multiple dialects that not only differ from each other in terms of accent (pronunciation) but also in terms of morphological forms and lexical choice. We present the first approach to automatically detect the dialect of a speaker based on a dialect transcript and transcript with audio recording in a dataset consisting of 23 different dialects. Our results show that the best accuracy is received by combining both of the modalities, as text only reaches to an overall accuracy of 57%, where as text and audio reach to 85%. Our code, models and data have been released openly on Github and Zenodo.

## introduction we present an approach for identifying the dialect of a speaker automatically solely based on text and on audio and text together. we compare the unimodal approach to the bimodal one. there are no previous dialect identification approaches for finnish. there are several situations were a dialect identification method can be of use. for example, if we have asr models fine tuned for specific dialects, the dialect identification from audio could be used as a preprocessing step. the model could also be used to label recorded materials automatically in order to create archival metadata. in order to make our contribution useful for others, we have released our code, models and processed data openly on github foot_0 and zenodo foot_1 . finnish is a large uralic language that is one of the official languages of finland, and is used essentially at all levels of the modern society. there are approximately five million finnish speakers. the language belongs to the finnic branch of the uralic language family, and is very closely related to karelian, meänkieli and kveeni, and is also closely related to the estonian language. it is more distantly related to numerous uralic languages spoken in russia. the history of written finnish starts in the 16th century. current orthography is connected to this written tradition, which developed into the current form in the late 19th century with a conscious planning and systematic development of the lexicon. after this, the changes have been minor @xcite , and also impacted lexicon, especially what it comes to the development of the vocabulary of the modern society and traditional agrarian terminology becoming less known. the finnish spoken language, however, is still largely based on finnish dialects. in the 20th century some of the strongest dialectal features have been disappearing, but there are still clearly distinguishable spoken vernacular varieties that are regionally marked. it has been shown that instead of clear disappearance of dialects there are various features that are spreading, but not at uniform rate, and reportedly younger speakers use the areally marked features less than the older speakers @xcite . finnish vernaculars also represent historically rather different finnic varieties, with major split between eastern and western dialects. there are, however, also dialect continuums and traditionally found gradual differentiation from region to region. many of the changes have been lexical due to technical innovations and modernization of the society: orthographic spelling conventions have largely remained the same. spoken finnish, on the other hand, traditionally represents an areally divided dialect continuum, with several sharp boundaries, and many regions of gradual differentiation from one municipality to another municipality. as mentioned, in the later parts of the 20th century relatively strong dialect leveling has been taking place. some of the finnish dialects may already be concerned endangered, although the complex relationship between contemporary vernaculars and the most traditional dialectal forms makes this hard to ascertain. dialect leveling in itself is a process known from many parts of europe @xcite . however, in the case of finnish the written standard has remained relatively far from the spoken finnish, besides individual narrow domains such as news broadcasts were the written form is used also in speech. additionally there have been distinct text collections that include materials from this dialect archive. these include dialect books specific regions and municipalities, such as oulun murrekirja [dialect book of oulu] @xcite or savonlinnan seudun murrekirja [dialect book of savonlinna region] @xcite . there have also been more recent larger collections that contains excerpts from essentially all dialects @xcite . especially in the later parts of 21th century the spoken varieties have been leveling away from very specific local dialects, and although regional varieties still exist, most of the local varieties have certainly became endangered. similar processes of dialect convergence have been reported from different regions in europe, although with substantial variation @xcite . in the case of finnish this has not, however, resulted in merging of the written and spoken standards, but the spoken finnish has remained, to our day, very distinct from the written standard. in a late 1950s, a program was set up to document extant spoken dialects, with the goal of recording 30 hours of speech from each municipality. this work resulted in very large collections of dialectal recordings @xcite . many of these have been published, and some portion has also been manually normalized. dataset used is described in more detail in section 3 data. in finnish linguistics the dialect identification has primarily been studied in the context of folk linguistics. in this line of research the perceptions of native speakers are investigated @xcite . this type of studies have been done for finnish, for example, by @xcite , @xcite and @xcite . it has been possible to suggest for individual dialects which features are the most stable and will remain as local regional markers, and which seem to be in retention @xcite . in this study we conduct just individual experiments and report their results, but in the further research we hope the results could be analyzed in more detail in connection with the earlier dialect perception studies, as we believe the differences in perceived dialect differences could be compared to the difficulties and successes the model has to differentiate individual varieties. ## related work the current approaches to finnish dialect have focused on the textual modality only. previously, bidirectional lstm (long short-term memory) based models have been used to normalize finnish dialects to standard finnish @xcite and to adapt standard finnish text into different dialectal forms @xcite . similar approach has also been used to normalize historical finnish @xcite . the closest research to our paper conducted for finnish has been detection of foreign accents from audio. @xcite have detected foreign accents from audio only by using i-vectors. however, foreign accent detection is a very different task to native speaker dialect detection. many foreign accents have clear cues through phonemes that are not part of the finnish phonotactic system, where as with dialects, all phonemes are part of finnish. there have been several recent approaches for arabic to detect dialect from text @xcite @xcite . textual dialect detection has been done also for german @xcite , romanian @xcite and low saxon @xcite . the methods used range from traditional machine learning with features such as n-grams to neural models with pretrained embeddings, as it is typically the case in nlp research. none of these approaches use audio, as they rely on text only. at the same time, north sami dialects have been identified from audio by training several models, knns, svms, rfs, crfs, and lstm, based on extracted features @xcite . @xcite use mel-weighted sff spectrogram to detect spoken arabic dialects. mel spectograms are also used by @xcite . all these approaches are mono-modal and use only audio. based on our literature review, the existing approaches use either text or audio for dialect detection. we, however, use both modalities and apply them on a language with no existing dialect detection models. ## data the finnish dialects are exceptionally well documented. in the 1950s the finnish dialect archive was formed with the goal of recording 30 hours of speech from each finnish municipality. this goal was reached fast, and exceeded, resulting in a very large collection of archived materials that is stored in the institute for the languages of finland @xcite , and known as tape archive of the finnish language foot_2 . there have been numerous publications based on these materials, although it is hard to estimate into which extent this covers the entire body of recorded work, which totals 24,000 hours of audio. the largest individual publication of these materials is beyond doubt the samples of spoken finnish series that was published in 1978-2000 as 50 booklets. 4 each book contained approximately two hours of transcriptions, from two different speakers, and represents a different municipality. later these materials have been digitized and published as an openly licensed dialect corpus (institute for the languages of finland, 2014). there are also other related corpora, most importantly the finnish dialect syntax archive that contains similar recordings annotated morphosyntactically (university of turku and institute for the languages of @xcite . since 1980s follow-up research has been done in selected municipalities to track the changes in the dialects @xcite , which is another significant line of research that complements these older dialect materials. later the work on these published materials has resulted in multiple electronic corpora that are currently available. although they represent only a tiny fraction of the entire recorded material, they reach remarkable coverage of different dialects and varieties of spoken finnish. some of these corpora contain various levels of manual annotation, while others are mainly plain text with associated metadata. materials of this type can be characterized by an explicit attempt to represent dialects in linguistically accurate manner, having been created primarily by linguists with formal training in the field. these transcriptions are usually written with a transcription systems specific for each research tradition. the result of this type of work is not simply a text containing some dialectal features, but a systematic and scientific transcription of the dialectal speech. the corpus we have used in this study is the above-mentioned samples of spoken finnish corpus (institute for the languages of finland, 2014). the electronic version contains manually annotated normalization into standard finnish. the corpus is almost 700,000 tokens large. the digital version, including audio, is published with cc-by license, and is available in the language bank of finland. 5 we have selected it into this study because of the open license and large dialectal scope. we have downloaded the corpus with the original audio files, and extracted from the audio all utterances that are shorter than 10 seconds in length. the dialect region classification is taken directly from the corpus metadata. despite the successful attempt of the authors of the corpus to include all dialects, the dialects are not entirely equally represented in the corpus. one reason for this is certainly the different sizes of the dialect areas, and the variation introduced by different speech rates of individual speakers. the difference in the number of sentences per dialect can be seen in ## dialect detection in this section, we describe the two different models we used to detect dialect automatically in the corpus. the first method is based on text only and the second method uses text and audio. both of the methods used the same training, validation and test splits. ## results the results of the two models can be seen in when comparing the per dialect performance of the better model with the amount of data available for each dialect, we can make an interesting observation that a high amount of data does not equal to a high f1-score. out of the 10 dialects with the largest amount of samples in the data, only 3, kaakkois-häme, inkerinsuomalaismurteet and kainuu, reached to an f1-score of at least 0.90. the f1-score of the dialect with the second highest number of samples, pohjoinen keski-suomi, was only 0.86. other dialects that had an f1-score of at least 0.9 were the 11th most resourced etelä-häme, the 14th most resourced keski-karjala and the 16th and 17th most resourced länsi-uusimaa and länsipohja. the lowest f1-score was 0.5 for pohjois-pohjanmaa. this is interesting as the dialect is the 12th most resourced one. even the two least resourced dialects in our dataset, etelä-karjala and pohjoinen keski-suomi got higher f1-scores, 0.69 and 0.75 respectively. these results are an indication that some of the dialects are more clearly marked making them easier to detect even with less data, while some other dialects may have undergone a process of dialect leveling (see hinskens 1998) making them less distinct from other dialectal forms of finnish. it is also possible that some dialects are already significantly close to one another, and thereby the model simply cannot distinguish them accurately. further error analysis could reveal important details of this type. ## conclusions we have presented the first model for finnish dialect classification for a relatively large number of different dialects, 23 in total. based on our experiments, a text only model is not as effective in dialect classification as a model with text and audio. it is clear that the amount of data alone is not the only variable that constitutes a high performance of the model for a given dialect, but also how distinctive a given dialect is from other dialects. since the speakers in the test set were not present in the training, we are confident that the dialect is the feature that the model has learned to predict. using the audio materials offers in itself new interesting possibilities for dialect clustering and comparison. traditional dialect atlases have also been used in automatic comparison and grouping of different finnish dialects @xcite . in further research we believe also this kind of information could be connected to the analysis to show how the dialect identification exactly interacts with the dialectal variation and differences at close municipality level. at the same time the identifiability of a dialect must be connected to the degree of dialect leveling, linguistic distances and differences between them, so applying the model into newer recordings could also yield information about these processes. we have made all the data, code and models openly available on github 11 and zenodo 12 . we believe that this is the only way to ensure this line of research continues for the finnish language in the future as well.