Dogfennaeth API Adnabod Lleferydd

Speech Recognition API Documentation


Trosi sain leferydd Cymraeg neu Saesneg i destun. Mae'r API yn hwyluso’r broses o dderbyn trawsgrifiad yn y fformatau .srt a .vtt. Gall y sain ddod o ffeil amlgyfrwng bach neu fawr. Convert Welsh or English speech audio into text. The API makes it easy to receive transcriptions in .srt and .vtt formats. Audio can originate from small or large multimedia files.

API Fersiwn 2 (v2) API Version 2 (v2)

Trawsgrifio

Transcribe

https://api.techiaith.cymru/speech-to-text/v2/transcribe/

Paramedr Math Disgrifiad
Field Type Description
speaker string Enw Name
soundfile String Lleoliad y ffeil wav neu mp3 hoffwch chi drawsgrifio Path to the wav or mp3 file you wish to transcribe

Enghraifft:

Example:

                        
                            curl -X POST -F 'soundfile=@speech.wav' https://api.techiaith.cymru/speech-to-text/v2/transcribe/
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
    "id":"188a0e4d-4ac8-4992-af7d-7ba6f71bc02d",
    "version":2,
    "success":true,
    "transcripts":[
        {
            "start":0.609,
            "end":4.628,
            "text":"Mae ganddynt ddau o blant, mab a merch.",
            "words":[
                {"word":"Mae","start":0.609,"end":0.79,"score":0.361},
                {"word":"ganddynt","start":0.83,"end":1.493,"score":0.258},
                {"word":"ddau","start":1.634,"end":2.096,"score":0.203},
                {"word":"o","start":2.156,"end":2.217,"score":0.333},
                {"word":"blant,","start":2.257,"end":2.86,"score":0.208},
                {"word":"mab","start":3.201,"end":3.643,"score":0.161},
                {"word":"a","start":4.105,"end":4.226,"score":0.167},
                {"word":"merch.","start":4.286,"end":4.628,"score":0.37}
            ],
            "chars":[
                {"char":"M","start":0.609,"end":0.689,"score":0.25},
                {"char":"a","start":0.689,"end":0.73,"score":0.5},
                {"char":"e","start":0.73,"end":0.79,"score":0.333},
                {"char":" ","start":0.79,"end":0.83,"score":0.5},
                {"char":"g","start":0.83,"end":0.91,"score":0.25},
                ...
                {"char":"c","start":4.568,"end":4.608,"score":0.5},
                {"char":"h","start":4.608,"end":4.628,"score":0.649},
                {"char":"."}
            ]
        }
    ]
}
                        
                    

API Fersiwn 1 (v1) API Version 1 (v1)

Trawsgrifio

Transcribe

https://api.techiaith.cymru/speech-to-text/v1/transcribe/

Paramedr Math Disgrifiad
Field Type Description
soundfile String Lleoliad y ffeil wav neu mp3 hoffwch chi drawsgrifio Path to the wav or mp3 file you wish to transcribe

Enghraifft:

Example:

                        
                            curl -X POST -F 'soundfile=@speech.wav' https://api.techiaith.cymru/speech-to-text/v1/transcribe/
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
    "version": 1,
    "success": true,
    "transcripts": [
        {
            "text": "mae ganddynt ddau o blant mab a merch ",
            "confidence": 0.999,
            "start": 0.0,
            "end": 5.50275,
            "alignment": [
                ["m", 30],
                ["a", 34],
                ["e", 37],
                [" ", 40],
                ...
                ["c", 228],
                ["h", 231],
                [" ", 273]
            ]
        }
    ]
}
                        
                    

API Fersiwn 1 (v1) API Version 1 (v1)

Alinio

Align

https://api-dev.techiaith.cymru/speech-to-text/v1/align/

Paramedr Math Disgrifiad
Field Type Description
soundfile String Lleoliad y ffeil wav neu mp3 hoffwch chi drawsgrifio Path to the wav or mp3 file you wish to transcribe
text string Trawsgrifiad o'r leferydd Transcription of the contained speech

Enghraifft:

Example:

                        
                            curl -F 'soundfile=@speech.wav' -F 'text=mae ganddynt ddau o blant mab a merch' https://api-dev.techiaith.cymru/speech-to-text/v1/align/
                        
                    

Canlyniad Enghreifftiol:

Example Result:

                        
                            {
  "id": "e6cad513-eddd-4cd4-977c-ecca18b3ae4e",
  "version": 1,
  "success": true,
  "alignment": {
    "segments": [
      {
        "start": 0.42,
        "end": 5.13,
        "text": "mae ganddynt ddau o blant mab a merch",
        "words": [
          {
            "start": 0,
            "end": 0.76,
            "text": "mae",
            "confidence": 0.6665642093473659
          },
          {
            "start": 0.76,
            "end": 1.42,
            "text": "ganddynt",
            "confidence": 0.9998578354716301
          },
          {
            "start": 1.42,
            "end": 1.96,
            "text": "ddau",
            "confidence": 0.9996382892131805
          },
          {
            "start": 1.96,
            "end": 2.12,
            "text": "o",
            "confidence": 0.8833763599395752
          },
          {
            "start": 2.12,
            "end": 2.4,
            "text": "blant",
            "confidence": 0.9984653472900391
          },
          {
            "start": 2.4,
            "end": 2.9,
            "text": "mab",
            "confidence": 0.9999081293741862
          },
          {
            "start": 2.9,
            "end": 3.24,
            "text": "a",
            "confidence": 0.9964669942855835
          },
          {
            "start": 3.24,
            "end": 4.22,
            "text": "merch",
            "confidence": 0.9997758030891418
          }
        ]
      }
    ]
  }
}
                        
                    

Cookies

Briwsion


We use cookies to improve your experience and enable recording your voice.

Rydym yn defnyddio briwsion i wella eich profiad a galluogi recordio eich llais

Accept & Continue Derbyn a Pharhau

Need to learn more? Privacy & Cookie Policy

Angen dysgu mwy? Preifatrwydd a Pholisi Briwsion