2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OCI Speechを使ってみたメモ

2
Last updated at Posted at 2025-09-10

はじめに

OCI Speechを使ってみたメモです。

準備

適当な音声ファイルを用意して、Object Storageにアップロードします。
なお、日本語には対応していないようですので、英語のファイルを用意しました。
モデルタイプを変更すれば日本語に対応してました。

スクリーンショット 2025-09-11 7.40.19.png

ジョブの作成

OCIコンソールから「ジョブの作成」をクリックします。

スクリーンショット 2025-09-11 7.36.35.png

こんな感じで設定しました。

スクリーンショット 2025-09-11 7.37.54.png

スクリーンショット 2025-09-11 7.41.13.png

ファイルの選択でバケットにあるファイルを選択します。

スクリーンショット 2025-09-11 7.41.34.png

ジョブの作成が終わるとステータスが成功になります。

スクリーンショット 2025-09-11 7.42.57.png

追記(日本語対応)

日本語を使うには「モデルタイプ」をデフォルトから変える必要がありました。

スクリーンショット 2025-09-14 14.41.06.png

確認

作成したジョブをクリックし、タスクをクリックします。

スクリーンショット 2025-09-11 7.44.39.png

こんな感じで文字起こしされた結果が確認できます。ざっとみた感じですと、精度は90%くらいでした。

スクリーンショット 2025-09-11 7.45.10.png

結果はObject Storageに保存されています。

スクリーンショット 2025-09-11 7.49.42.png

JSONでもダウンロードできます。

{
    "status": "SUCCESS",
    "timeCreated": "2025-09-10 22:41:56.562",
    "modelDetails": {
        "domain": "GENERIC",
        "languageCode": "en-US",
        "modelType": "ORACLE"
    },
    "audioFormatDetails": {
        "format": "MPEG",
        "numberOfChannels": 2,
        "encoding": "MPEG",
        "sampleRateInHz": 44100
    },
    "transcriptions": [
        {
            "transcription": "Pardon. O king cried the little mouse. Forgive me this time. I shall never forget it. Who knows? But I may be able to do you a turn some of these days. The lion was so tickled at the idea of the mouse being able to help him that he lifted up his paw and let him go sometime. Hunters who desire to carry him alive to the king tied him to a tree while they went in search of a wagon to carry him on. Just then the little mouse happened to pass by, and, seeing the sad plight in which the lion was, went up to him and soon gnawed away the ropes that bound the king of the beasts.",
            "confidence": "0.9746",
            "tokens": [
                {
                    "token": "Pardon",
                    "startTime": "0.780s",
                    "endTime": "1.440s",
                    "confidence": "0.9663",
                    "type": "WORD"
                },
                {
                    "token": ".",
                    "startTime": "1.440s",
                    "endTime": "1.440s",
                    "confidence": "0.7994",
                    "type": "PUNCTUATION"
                },
                {
                    "token": "O",
                    "startTime": "1.440s",
                    "endTime": "1.680s",
                    "confidence": "0.9653",
                    "type": "WORD"
                },
                {
                    "token": "king",
                    "startTime": "1.680s",
                    "endTime": "1.920s",
                    "confidence": "0.9682",
                    "type": "WORD"
                },
                {
                    "token": "cried",
                    "startTime": "2.400s",
                    "endTime": "2.760s",
                    "confidence": "0.9753",
                    "type": "WORD"
                },
                {
                    "token": "the",
                    "startTime": "2.760s",
                    "endTime": "2.940s",
                    "confidence": "0.9756",
                    "type": "WORD"
                },
                {
                    "token": "little",
                    "startTime": "2.940s",
                    "endTime": "3.120s",
                    "confidence": "0.9750",
                    "type": "WORD"
                },
## 省略
                {
                    "token": ".",
                    "startTime": "42.420s",
                    "endTime": "42.420s",
                    "confidence": "0.8765",
                    "type": "PUNCTUATION"
                }
            ]
        }
    ]
}

追記(日本語の結果)

短い音声でしたが、数字も含めて全部文字起こししてくれてました。

スクリーンショット 2025-09-14 14.50.46.png

2
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?