# Score Text/Fluency

{% hint style="info" %}
**Run in Postman:** [Score Fluency](https://docs.speechace.com/#c34b11dd-8172-441a-bc27-223339d48d8e)
{% endhint %}

Fluency and Pronunciation are scored based on a speaker reading aloud a passage for up to [45 seconds.](#user-content-fn-1)[^1] The request parameters which you can see in the cURL below are the same as in the [Score Text/Pronunciation](https://api-docs.speechace.com/api-reference/score-text-pronunciation) function. Please review below sections on making a simple CURL based request to the fluency scoring function:

{% tabs %}
{% tab title="curl" %}
{% code overflow="wrap" lineNumbers="true" %}

```curl
curl --location -g 'https://api.speechace.co/api/scoring/text/v9/json?key={{speechace_prokey}}&dialect=en-us' \
--form 'text="Yes, I do. Travel today is vastly different than what it used to be. In the past, a traveller had little idea about what to expect when they arrived at their destination. These days, the internet connects our world in ways previous generations could only dream about. We can instantly review destination information and make travel arrangements. Also, in the past, people could only travel by land or sea and travelling was often long and unsafe."' \
--form 'user_audio_file=@"./traveltoday.wav"' \
--form 'include_fluency="1"'
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Query Parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameter | Type   | Description                                                                                                                                                                                                                                                                                                               |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| key       | String | *API* [*key*](https://app.gitbook.com/o/8miq9EcDdZOxBexpQST9/s/KaDVy4leVobAfOfVNuic/getting-started/pre-requisites/getting-the-api-key/~/comments) *issued by Speechace.*                                                                                                                                                 |
| dialect   | String | *This is the* [*dialect*](https://app.gitbook.com/o/8miq9EcDdZOxBexpQST9/s/KaDVy4leVobAfOfVNuic/getting-started/supported-languages/~/comments) *in which the speaker will be assessed.*&#x200B;**Note: Not all features of the score/text API support every dialect. Applicable dialects will be explicitly mentioned.** |
| user\_id  | String | ***Optional**: A unique anonymized identifier (generated by your application) for the end-user who spoke the audio.*                                                                                                                                                                                                      |

#### Request Body <a href="#request-body" id="request-body"></a>

| Parameter               | Type   | Description                                                                                                                                                                                                                                                                                                                              |
| ----------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| text                    | String | *A word, phrase, or sentence to score. This should be in the* [*dialect*](https://app.gitbook.com/o/8miq9EcDdZOxBexpQST9/s/KaDVy4leVobAfOfVNuic/getting-started/supported-languages/~/comments) *chosen. For example, if `fr-fr` is the chosen dialect, then the word can be `Salut`.*                                                   |
| user\_audio\_file       | File   | *file with user audio (wav, mp3, m4a, webm, ogg, aiff)*                                                                                                                                                                                                                                                                                  |
| question\_info          | String | ***Optional**: A unique identifier (generated by your application) for the activity or question this user audio is answering.*                                                                                                                                                                                                           |
| no\_mc                  | String | ***Optional**: `no_mc = 1` to indicate the text field contains multiple lines.*                                                                                                                                                                                                                                                          |
| include\_fluency        | String | Set `include_fluency`*`= 1` to include fluency scoring in the response.*                                                                                                                                                                                                                                                                 |
| include\_intonation     | String | ***Optional:*** `include_intonation`*`= 1` to include intonation and stress-level scores. See this* [*guide*](https://app.gitbook.com/o/8miq9EcDdZOxBexpQST9/s/KaDVy4leVobAfOfVNuic/features/scripted-activities/lexical-stress-and-intonation/~/comments) *for how to use this field.*                                                  |
| markup\_language        | String | ***Optional:*** `markup_language = arpa_mark` *This key signifies that the* `text` *parameter may contain markup annotations.See this* [*guide*](https://app.gitbook.com/o/8miq9EcDdZOxBexpQST9/s/KaDVy4leVobAfOfVNuic/features/scripted-activities/pronunciation-scoring/custom-pronunciations/~/comments) *for how to use this field.* |
| include\_unknown\_words | String | **Optional:** `include_unknown_words = 1`*This key instructs Speechace to automatically infer the expected pronunciation for unknown terms, such as names, places, and other specific terminology. This ensures accurate feedback even for unfamiliar words.*                                                                            |
| detect\_dialect         | String | ***Optional field**: Possible values - 0 \| 11: will apply language detection and warn if the majority of the response language is different from the intended scoring dialect.*                                                                                                                                                         |
| enforce\_dialect        | String | ***Optional field**: Possible values - 0 \| 11: will apply language detection and error if the majority of the response language is different from the intended scoring dialect.Setting enforce\_dialect=1 automatically sets detect\_dialect=1.*                                                                                        |

The responses below show a correct response, and a response where the speaker doesn't read the complete passage and as a result triggers fidelity detection.&#x20;

{% hint style="info" %}
[Fidelity detection](#fidelity-detection) identifies when the test-taker deviates from intended utterance and API detects incomplete or off-script attempts.
{% endhint %}

{% tabs %}
{% tab title="Response OK" %}
{% code overflow="wrap" lineNumbers="true" %}

```json5
{
  "status": "success",
  "quota_remaining": -1,
  "text_score": {
    "text": "Yes, I do. Travel today is vastly different than what it used to be. In the past, a traveller had little idea about what to expect when they arrived at their destination. These days, the internet connects our world in ways previous generations could only dream about. We can instantly review destination information and make travel arrangements. Also, in the past, people could only travel by land or sea and travelling was often long and unsafe.",
    "word_score_list": [<...word scores for the words in the utterance>],
    "ielts_score": {<...ielts score>},
    "pte_score": {<...pte score>},
    "speechace_score": {<...speechace scores>},
    "toeic_score": {<...toeic scores>},
    "cefr_score": {<...cefr scores>},
    "fluency": {
      "segment_metrics_list": [
        {
          "segment": [
            0,
            3
          ],
          "duration": 1.005,
          "articulation_length": 0.69,
          "syllable_count": 3,
          "correct_syllable_count": 3,
          "correct_word_count": 3,
          "word_count": 3,
          "speech_rate": 2.985074626865672,
          "articulation_rate": 4.347826086956522,
          "syllable_correct_per_minute": 179.10447761194033,
          "word_correct_per_minute": 179.10447761194033,
          "all_pause_count": 1,
          "all_pause_duration": 0.315,
          "mean_length_run": 0.69,
          "max_length_run": 0.69,
          "all_pause_list": [
            [
              144,
              175.5
            ]
          ],
          "ielts_score": {
            "pronunciation": 9,
            "fluency": 8.5
          },
          "pte_score": {
            "pronunciation": 90,
            "fluency": 90
          },
          "speechace_score": {
            "pronunciation": 100,
            "fluency": 93
          },
          "toeic_score": {
            "pronunciation": 200,
            "fluency": 190
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "C2"
          }
        },
        {
          "segment": [
            3,
            14
          ],
          "duration": 3.525,
          "articulation_length": 2.82,
          "syllable_count": 15,
          "correct_syllable_count": 14,
          "correct_word_count": 11,
          "word_count": 11,
          "speech_rate": 4.25531914893617,
          "articulation_rate": 5.319148936170213,
          "syllable_correct_per_minute": 238.29787234042553,
          "word_correct_per_minute": 187.2340425531915,
          "all_pause_count": 2,
          "all_pause_duration": 0.705,
          "mean_length_run": 2.82,
          "max_length_run": 2.82,
          "all_pause_list": [
            [
              175.5,
              207
            ],
            [
              489,
              528
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 8
          },
          "pte_score": {
            "pronunciation": 90,
            "fluency": 88
          },
          "speechace_score": {
            "pronunciation": 95,
            "fluency": 91
          },
          "toeic_score": {
            "pronunciation": 190,
            "fluency": 180
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "C1+"
          }
        },
        {
          "segment": [
            14,
            32
          ],
          "duration": 5.205,
          "articulation_length": 4.52,
          "syllable_count": 29,
          "correct_syllable_count": 25,
          "correct_word_count": 15,
          "word_count": 18,
          "speech_rate": 5.571565802113352,
          "articulation_rate": 6.415929203539823,
          "syllable_correct_per_minute": 288.1844380403458,
          "word_correct_per_minute": 172.9106628242075,
          "all_pause_count": 3,
          "all_pause_duration": 0.685,
          "mean_length_run": 2.26,
          "max_length_run": 3.95,
          "all_pause_list": [
            [
              528,
              567
            ],
            [
              624,
              625
            ],
            [
              1020,
              1048.5
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 7.5
          },
          "pte_score": {
            "pronunciation": 89,
            "fluency": 74
          },
          "speechace_score": {
            "pronunciation": 92,
            "fluency": 82
          },
          "toeic_score": {
            "pronunciation": 190,
            "fluency": 170
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "C1"
          }
        },
        {
          "segment": [
            32,
            47
          ],
          "duration": 6.045,
          "articulation_length": 4.92,
          "syllable_count": 25,
          "correct_syllable_count": 22,
          "correct_word_count": 13,
          "word_count": 15,
          "speech_rate": 4.1356492969396195,
          "articulation_rate": 5.08130081300813,
          "syllable_correct_per_minute": 218.36228287841192,
          "word_correct_per_minute": 129.03225806451613,
          "all_pause_count": 3,
          "all_pause_duration": 1.125,
          "mean_length_run": 2.46,
          "max_length_run": 2.85,
          "all_pause_list": [
            [
              1048.5,
              1077
            ],
            [
              1362,
              1422
            ],
            [
              1629,
              1653
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 8
          },
          "pte_score": {
            "pronunciation": 89,
            "fluency": 86
          },
          "speechace_score": {
            "pronunciation": 92,
            "fluency": 90
          },
          "toeic_score": {
            "pronunciation": 190,
            "fluency": 180
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "C1+"
          }
        },
        {
          "segment": [
            47,
            57
          ],
          "duration": 4.05,
          "articulation_length": 3.63,
          "syllable_count": 22,
          "correct_syllable_count": 18,
          "correct_word_count": 9,
          "word_count": 10,
          "speech_rate": 5.432098765432099,
          "articulation_rate": 6.0606060606060606,
          "syllable_correct_per_minute": 266.6666666666667,
          "word_correct_per_minute": 133.33333333333334,
          "all_pause_count": 2,
          "all_pause_duration": 0.42,
          "mean_length_run": 3.63,
          "max_length_run": 3.63,
          "all_pause_list": [
            [
              1653,
              1677
            ],
            [
              2040,
              2058
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 7
          },
          "pte_score": {
            "pronunciation": 90,
            "fluency": 66
          },
          "speechace_score": {
            "pronunciation": 93,
            "fluency": 77
          },
          "toeic_score": {
            "pronunciation": 190,
            "fluency": 160
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "B2"
          }
        },
        {
          "segment": [
            57,
            76
          ],
          "duration": 5.76,
          "articulation_length": 5.16,
          "syllable_count": 26,
          "correct_syllable_count": 23,
          "correct_word_count": 16,
          "word_count": 19,
          "speech_rate": 4.513888888888889,
          "articulation_rate": 5.038759689922481,
          "syllable_correct_per_minute": 239.58333333333334,
          "word_correct_per_minute": 166.66666666666669,
          "all_pause_count": 2,
          "all_pause_duration": 0.6,
          "mean_length_run": 2.58,
          "max_length_run": 2.85,
          "all_pause_list": [
            [
              2058,
              2076
            ],
            [
              2361,
              2403
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 8.5
          },
          "pte_score": {
            "pronunciation": 90,
            "fluency": 90
          },
          "speechace_score": {
            "pronunciation": 95,
            "fluency": 92
          },
          "toeic_score": {
            "pronunciation": 190,
            "fluency": 190
          },
          "cefr_score": {
            "pronunciation": "C2",
            "fluency": "C2"
          }
        }
      ],
      "overall_metrics": {
        "segment": [
          0,
          76
        ],
        "duration": 25.59,
        "articulation_length": 21.74,
        "syllable_count": 120,
        "correct_syllable_count": 105,
        "correct_word_count": 67,
        "word_count": 76,
        "speech_rate": 4.6893317702227435,
        "articulation_rate": 5.519779208831647,
        "syllable_correct_per_minute": 246.18991793669403,
        "word_correct_per_minute": 157.0926143024619,
        "all_pause_count": 8,
        "all_pause_duration": 3.85,
        "mean_length_run": 2.4155555555555552,
        "max_length_run": 3.95,
        "all_pause_list": [
          [
            144,
            207
          ],
          [
            489,
            567
          ],
          [
            624,
            625
          ],
          [
            1020,
            1077
          ],
          [
            1362,
            1422
          ],
          [
            1629,
            1677
          ],
          [
            2040,
            2076
          ],
          [
            2361,
            2403
          ]
        ]
      },
      "fluency_version": null
    }
  },
  "version": "9.8"
}
    
```

{% endcode %}
{% endtab %}

{% tab title="Response Incomplete" %}
{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "status": "success",
  "quota_remaining": -1,
  "text_score": {
    "text": "Yes, I do. Travel today is vastly different than what it used to be. In the past, a traveller had little idea about what to expect when they arrived at their destination. These days, the internet connects our world in ways previous generations could only dream about. We can instantly review destination information and make travel arrangements. Also, in the past, people could only travel by land or sea and travelling was often long and unsafe.",
    "word_score_list": [<...word scores for the words in the utterance>],
    "ielts_score": {<...ielts score>},
    "pte_score": {<...pte score>},
    "speechace_score": {<...speechace scores>},
    "toeic_score": {<...toeic scores>},
    "cefr_score": {<...cefr scores>},
    "score_issue_list": [
      {
        "status": "warning",
        "short_message": "response_incomplete",
        "detail_message": "The response doesn't follow the script completely.",
        "source": "fluency"
      }
    ],
    "fluency": {
      "segment_metrics_list": [
        {
          "segment": [
            0,
            3
          ],
          "duration": 1.135,
          "articulation_length": 0.87,
          "syllable_count": 3,
          "correct_syllable_count": 3,
          "correct_word_count": 3,
          "word_count": 3,
          "speech_rate": 2.643171806167401,
          "articulation_rate": 3.4482758620689657,
          "syllable_correct_per_minute": 158.59030837004406,
          "word_correct_per_minute": 158.59030837004406,
          "all_pause_count": 3,
          "all_pause_duration": 0.265,
          "mean_length_run": 0.29,
          "max_length_run": 0.41,
          "all_pause_list": [
            [
              54,
              55
            ],
            [
              63,
              64
            ],
            [
              105,
              129.5
            ]
          ],
          "ielts_score": {
            "pronunciation": 9,
            "fluency": 8.5
          },
          "pte_score": {
            "pronunciation": 89,
            "fluency": 85
          },
          "speechace_score": {
            "pronunciation": 99,
            "fluency": 96
          }
        },
        {
          "segment": [
            3,
            14
          ],
          "duration": 2.965,
          "articulation_length": 2.61,
          "syllable_count": 15,
          "correct_syllable_count": 14,
          "correct_word_count": 10,
          "word_count": 11,
          "speech_rate": 5.059021922428331,
          "articulation_rate": 5.74712643678161,
          "syllable_correct_per_minute": 283.3052276559865,
          "word_correct_per_minute": 202.36087689713324,
          "all_pause_count": 8,
          "all_pause_duration": 0.355,
          "mean_length_run": 0.32625,
          "max_length_run": 0.47,
          "all_pause_list": [
            [
              129.5,
              154
            ],
            [
              198,
              199
            ],
            [
              246,
              250
            ],
            [
              297,
              298
            ],
            [
              333,
              334
            ],
            [
              348,
              350
            ],
            [
              357,
              358
            ],
            [
              396,
              397
            ]
          ],
          "ielts_score": {
            "pronunciation": 8.5,
            "fluency": 8
          },
          "pte_score": {
            "pronunciation": 83,
            "fluency": 77
          },
          "speechace_score": {
            "pronunciation": 94,
            "fluency": 89
          }
        },
        {
          "segment": [
            14,
            32
          ],
          "duration": 0,
          "articulation_length": 0,
          "syllable_count": 29,
          "correct_syllable_count": 0,
          "correct_word_count": 0,
          "word_count": 18,
          "speech_rate": 0,
          "articulation_rate": 0,
          "syllable_correct_per_minute": 0,
          "word_correct_per_minute": 0,
          "all_pause_count": 0,
          "all_pause_duration": 0,
          "mean_length_run": 0,
          "max_length_run": 0,
          "all_pause_list": [],
          "ielts_score": {
            "pronunciation": 0,
            "fluency": 0
          },
          "pte_score": {
            "pronunciation": 10,
            "fluency": 10
          },
          "speechace_score": {
            "pronunciation": 0,
            "fluency": 0
          }
        },
        {
          "segment": [
            32,
            47
          ],
          "duration": 0,
          "articulation_length": 0,
          "syllable_count": 26,
          "correct_syllable_count": 0,
          "correct_word_count": 0,
          "word_count": 15,
          "speech_rate": 0,
          "articulation_rate": 0,
          "syllable_correct_per_minute": 0,
          "word_correct_per_minute": 0,
          "all_pause_count": 0,
          "all_pause_duration": 0,
          "mean_length_run": 0,
          "max_length_run": 0,
          "all_pause_list": [],
          "ielts_score": {
            "pronunciation": 0,
            "fluency": 0
          },
          "pte_score": {
            "pronunciation": 10,
            "fluency": 10
          },
          "speechace_score": {
            "pronunciation": 0,
            "fluency": 0
          }
        },
        {
          "segment": [
            47,
            57
          ],
          "duration": 0,
          "articulation_length": 0,
          "syllable_count": 22,
          "correct_syllable_count": 0,
          "correct_word_count": 0,
          "word_count": 10,
          "speech_rate": 0,
          "articulation_rate": 0,
          "syllable_correct_per_minute": 0,
          "word_correct_per_minute": 0,
          "all_pause_count": 0,
          "all_pause_duration": 0,
          "mean_length_run": 0,
          "max_length_run": 0,
          "all_pause_list": [],
          "ielts_score": {
            "pronunciation": 0,
            "fluency": 0
          },
          "pte_score": {
            "pronunciation": 10,
            "fluency": 10
          },
          "speechace_score": {
            "pronunciation": 0,
            "fluency": 0
          }
        },
        {
          "segment": [
            57,
            76
          ],
          "duration": 0,
          "articulation_length": 0,
          "syllable_count": 27,
          "correct_syllable_count": 0,
          "correct_word_count": 0,
          "word_count": 19,
          "speech_rate": 0,
          "articulation_rate": 0,
          "syllable_correct_per_minute": 0,
          "word_correct_per_minute": 0,
          "all_pause_count": 0,
          "all_pause_duration": 0,
          "mean_length_run": 0,
          "max_length_run": 0,
          "all_pause_list": [],
          "ielts_score": {
            "pronunciation": 0,
            "fluency": 0
          },
          "pte_score": {
            "pronunciation": 10,
            "fluency": 10
          },
          "speechace_score": {
            "pronunciation": 0,
            "fluency": 0
          }
        }
      ],
      "overall_metrics": {
        "segment": [
          0,
          76
        ],
        "duration": 4.1,
        "articulation_length": 3.48,
        "syllable_count": 122,
        "correct_syllable_count": 17,
        "correct_word_count": 13,
        "word_count": 76,
        "speech_rate": 29.75609756097561,
        "articulation_rate": 35.05747126436782,
        "syllable_correct_per_minute": 248.78048780487808,
        "word_correct_per_minute": 190.2439024390244,
        "all_pause_count": 10,
        "all_pause_duration": 0.62,
        "mean_length_run": 0.31636363636363635,
        "max_length_run": 0.47,
        "all_pause_list": [
          [
            54,
            55
          ],
          [
            63,
            64
          ],
          [
            105,
            154
          ],
          [
            198,
            199
          ],
          [
            246,
            250
          ],
          [
            297,
            298
          ],
          [
            333,
            334
          ],
          [
            348,
            350
          ],
          [
            357,
            358
          ],
          [
            396,
            397
          ]
        ]
      },
      "fluency_version": null
    }
  },
  "version": "9.0"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

[^1]: This limit is 2 minutes with a Premium API plan.
