Speechace
  • Introduction
    • Overview
    • Use-Cases
  • Getting Started
    • Pre-requisites
      • API Features
      • Getting the API Key
      • API Regions and endpoints
      • API Limits
    • API Samples
    • Supported Languages
    • API Versioning
    • Authentication
    • Try the Speechace API
    • Error Handling
      • Common Errors
      • Retry Strategies
  • Solutions
    • Speaking Practice for Language Learning
    • Automated Language Assessment with AI
    • Voice AI for Early Literacy
    • Test Prep for Standardized tests
      • PTE Speaking Questions
      • IELTS Speaking Questions
      • TOEFL Speaking Questions
      • CEFR Speaking Questions
      • TOEIC Speaking Questions
    • Speaking Practice in Spanish and French
  • Features
    • Introduction
    • Scripted activities
      • Pronunciation Scoring
        • Word and Sentence pronunciation
        • Multiple choice
        • Custom pronunciations
        • Phoneme list
      • Fluency scoring
        • Passage scoring
      • Lexical stress and intonation
    • Spontaneous activities
      • Open-ended scoring
        • Language scoring
        • Relevance scoring
        • Language detection
      • Task achievement scoring
        • Describe Image
        • Re-tell Lecture
        • Answer Question
  • API Reference
    • Postman API reference
    • Score Text/Pronunciation
      • Handling overall scores
      • Handling word scores
      • Handling phoneme and syllable scores
    • Score Text/Multiple choice
      • Handling multiple choice response
    • Score Text/Markup Language
      • Handling Markup Response
    • Score Text/Stress & Intonation
      • Handing stress and intonation response
    • Score Text/Phoneme list
      • Handling phoneme list response
    • Score Text/Fluency
      • Handling fluency response
      • Fidelity detection
    • Score Text/Validate Text
    • Score Speech/Open-ended
      • Handling language scores
      • Per metric feedback
        • Grammar metrics
        • Vocabulary metrics
        • Coherence metrics
    • Score Speech/Relevance
      • Handling relevance response
    • Score Speech/Language Detection
    • Score Task/Task Achievement
  • Guides on common topics
    • Intepreting quality score
    • Interpreting overall scores
      • Pronunciation Bands
      • Fluency Bands
      • Vocabulary Bands
      • Grammar Bands
      • Coherence Bands
    • Scoring rubrics
    • Interpreting fidelity class
    • Phonetic notation
      • US English (en-us)
      • UK English (en-gb)
      • French (fr-fr, fr-ca)
      • Spanish (es-es, es-mx)
    • Getting word timestamps in audio
    • Automatic handling of unknown words
    • Phoneme to letter mapping
    • Markup Language
  • Other Resources
    • Requesting Support
    • Rate Limiting
    • Data Retention
    • FAQs
    • Appendices
Powered by GitBook
On this page
  1. Getting Started

Try the Speechace API

PreviousAuthenticationNextError Handling

Last updated 7 months ago

In this guide, sample code snippets are provided. These samples can be used to explore and understand the different types of API responses that may encountered.

Instructions to get started with Speechace API

  1. Download the following audio files:

  • apple.wav - contains the native English pronunciation for the word apple.

  • someparents.wav - contains the native English pronunciation for the sentence: "Some parents admire famous athletes as strong role models, so they name their children after them".

  1. Use the following example request to evaluate the pronunciation quality of the "Apple.wav" file available above:

curl --form text='apple' --form user_audio_file=@/path/to/apple.wav "https://api.speechace.co/api/scoring/text/v9/json?key=Insert_Your_API_Key_Here" | python -m json.tool

You can follow the to try out these requests in Postman by clicking on "Run in Postman".

We can also evaluate .mp3 files and many other

  1. The expected response for above cURL command for the audio "Apple.wav", is as follows:

{
  "status": "success",
  "quota_remaining": -1,
  "text_score": {
    "text": "apple",
    "word_score_list": [
      {
        "word": "apple",
        "quality_score": 100,
        "phone_score_list": [
          {
            "phone": "ae",
            "stress_level": 1,
            "extent": [
              12,
              27
            ],
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 2,
            "word_extent": [
              0,
              1
            ],
            "sound_most_like": "ae"
          },
          {
            "phone": "p",
            "stress_level": null,
            "extent": [
              27,
              39
            ],
            "quality_score": 100,
            "word_extent": [
              2,
              3
            ],
            "sound_most_like": "p"
          },
          {
            "phone": "ah",
            "stress_level": 0,
            "extent": [
              39,
              42
            ],
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 0,
            "word_extent": [
              3,
              4
            ],
            "sound_most_like": "ah"
          },
          {
            "phone": "l",
            "stress_level": null,
            "extent": [
              42,
              54
            ],
            "quality_score": 98.5,
            "word_extent": [
              3,
              4
            ],
            "sound_most_like": "l"
          }
        ],
        "syllable_score_list": [
          {
            "phone_count": 1,
            "stress_level": 1,
            "letters": "ap",
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 2,
            "extent": [
              12,
              27
            ]
          },
          {
            "phone_count": 3,
            "stress_level": 0,
            "letters": "ple",
            "quality_score": 100,
            "stress_score": 100,
            "predicted_stress_level": 0,
            "extent": [
              27,
              54
            ]
          }
        ]
      }
    ],
    "ielts_score": {
      "pronunciation": 9
    },
    "pte_score": {
      "pronunciation": 90
    },
    "speechace_score": {
      "pronunciation": 100
    },
    "toeic_score": {
      "pronunciation": 200
    },
    "cefr_score": {
      "pronunciation": "C2"
    }
  },
  "version": "9.3"
}

Related Guide: Pronunciation Scoring
link
audio format.
19KB
apple.wav
20KB
someparents.wav