readme: ---
  license: apache-2.0
  language: en
  datasets:
  - Jzuluaga/uwb_atcc
  tags:
  - text
  - token-classification
  - en-atc
  - en
  - generated_from_trainer
  - bert
  - bertraffic
  metrics:
  - Precision
  - Recall
  - Accuracy
  - F1
  - Jaccard Error Rate
  widget:
  - text: "lining up runway three one csa five bravo easy five three kilo romeo contact ruzyne ground one two one decimal nine good bye"
  - text: "csa seven three two zero so change of taxi quality eight nine sierra we need to full length britair five nine zero bravo contact ruzyne ground one two one decimal nine good bye"
  - text: "swiss four six one foxtrot line up runway three one and wait one two one nine csa four yankee alfa"
  - text: "tower klm five five tango ils three one wizz air four papa uniform tower roger"
  model-index:
  - name: bert-base-token-classification-for-atc-en-uwb-atcc
    results:
    - task:
          type: token-classification
          name: chunking
      dataset:
          type: Jzuluaga/uwb_atcc
          name: UWB-ATCC corpus (Air Traffic Control Communications)
          config: test
          split: test
      metrics:
      - type: F1
        value: 0.87
        name: TEST F1 (macro)
        verified: False
      - type: Accuracy
        value: 0.91
        name: TEST Accuracy
        verified: False
      - type: Precision
        value: 0.86
        name: TEST Precision (macro)
        verified: False
      - type: Recall
        value: 0.88
        name: TEST Recall (macro)
        verified: False   
      - type: Jaccard Error Rate
        value: 0.169
        name: TEST Jaccard Error Rate
        verified: False   
  ---
  
  # bert-base-token-classification-for-atc-en-uwb-atcc
  
  This model allow to detect speaker roles and speaker changes based on text. Normally, this task is done on the acoustic level. However, we propose to perform this task on the text level.
  We solve this challenge by performing speaker role and change detection with a BERT model. We fine-tune it on the chunking task (token-classification). 
  
  For instance:
  
  - Speaker 1: **lufthansa six two nine charlie tango report when established**
  - Speaker 2: **report when established lufthansa six two nine charlie tango**
  
  Based on that, could you tell the speaker role? Is it speaker 1 air traffic controller or pilot? 
  
  Also, if you have a recording with 2 or more speakers, like this: 
  
  - Recording with 2 or more segments: **report when established lufthansa six two nine charlie tango lufthansa six two nine charlie tango report when established**
  
  could you tell when the first speaker ends and when the second starts? This is basically diarization plus speaker role detection.
  
  Check the inference API (there are3 examples)! 
  
  
  This model is a fine-tuned version of [bert-base-uncased](https://huggingface.co/bert-base-uncased) on the [UWB-ATCC corpus](https://huggingface.co/datasets/Jzuluaga/uwb_atcc). 
  
  <a href="https://github.com/idiap/bert-text-diarization-atc">
      <img alt="GitHub" src="https://img.shields.io/badge/GitHub-Open%20source-green\">
  </a>
  
  It achieves the following results on the evaluation set:
  - Loss: 0.0098
  - Precision: 0.9760
  - Recall: 0.9741
  - F1: 0.9750
  - Accuracy: 0.9965
  
  
  Paper: [BERTraffic: BERT-based Joint Speaker Role and Speaker Change Detection for Air Traffic Control Communications](https://arxiv.org/abs/2110.05781).
  
  Authors: Juan Zuluaga-Gomez, Seyyed Saeed Sarfjoo, Amrutha Prasad, Iuliia Nigmatulina, Petr Motlicek, Karel Ondrej, Oliver Ohneiser, Hartmut Helmke
  
  Abstract: Automatic speech recognition (ASR) allows transcribing the communications between air traffic controllers (ATCOs) and aircraft pilots. The transcriptions are used later to extract ATC named entities, e.g., aircraft callsigns. One common challenge is speech activity detection (SAD) and speaker diarization (SD). In the failure condition, two or more segments remain in the same recording, jeopardizing the overall performance. We propose a system that combines SAD and a BERT model to perform speaker change detection and speaker role detection (SRD) by chunking ASR transcripts, i.e., SD with a defined number of speakers together with SRD. The proposed model is evaluated on real-life public ATC databases. Our BERT SD model baseline reaches up to 10% and 20% token-based Jaccard error rate (JER) in public and private ATC databases. We also achieved relative improvements of 32% and 7.7% in JERs and SD error rate (DER), respectively, compared to VBx, a well-known SD system. 
  
  Code — GitHub repository: https://github.com/idiap/bert-text-diarization-atc
  
  
  ## Intended uses & limitations
  
  This model was fine-tuned on air traffic control data. We don't expect that it keeps the same performance on some others datasets where BERT was pre-trained or fine-tuned.
  
  ## Training and evaluation data
  
  See Table 3 (page 5) in our paper:[BERTraffic: BERT-based Joint Speaker Role and Speaker Change Detection for Air Traffic Control Communications](https://arxiv.org/abs/2110.05781).. We described there the data used to fine-tune or model for speaker role and speaker change detection