ネットワーク接続が長時間アイドル状態の場合、エコーまたは>>(または他のもの)は失敗しますか?

ネットワーク接続が長時間アイドル状態の場合、エコーまたは>>(または他のもの)は失敗しますか?

完了には数時間かかるスクリプトがあります(スクリプトはささやきを実行します。最後に、SMBを使用してマウントされたネットワークボリュームにいくつかの結果を送信echoします>>。通常は特別な理由なく失敗します。ネットワーク接続が疑われます)長い間トラフィックこれがないので、ある種のアイドルモードに入り、私のスクリプトがここに書こうとすると、十分に早く「目が覚めません」。

スクリプトは実行時に>>を使用してWhisperの出力をファイルに追加します。完了したら、echoを使用して同じファイルの末尾にいくつかの結果を追加します。一般的に発生する現象は、>>処理結果の一部(すべてではない)がファイルに含まれ、その後にecho(および>>)を使用して追加された文字列が続くことです。

Whisperは出力の各ラインにタイムスタンプを追加するので、10分録音に使うと3分出力(10分予想時)が得られ、その後は同じファイルのエコーラインを使って最後に追加した内容が得られます。 。

GUIでこのネットワークボリュームが数時間アイドル状態になった後にアクセスすると、そのコンテンツの更新/表示に時間がかかりますが、インストール後に直接アクセスするとはるかに迅速に更新されます。

この場合、いくつかのエラーメッセージは次のとおりです。

Traceback (most recent call last):
  File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 413, in cli
    os.makedirs(output_dir, exist_ok=True)
  File "<frozen os>", line 225, in makedirs
FileNotFoundError: [Errno 2] No such file or directory: '.'

または

Traceback (most recent call last):
  File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 437, in cli
    result = transcribe(model, audio_path, temperature=temperature, **args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 339, in transcribe
    print(make_safe(line))
OSError: [Errno 5] Input/output error

または

Traceback (most recent call last):
  File "/Users/db/Library/Python/3.11/bin/whisper", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/transcribe.py", line 438, in cli
    writer(result, audio_path)
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/utils.py", line 201, in write_all
    writer(result, file)
  File "/Users/db/Library/Python/3.11/lib/python/site-packages/whisper/utils.py", line 83, in __call__
    with open(output_path, "w", encoding="utf-8") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'my.txt'
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
OSError: [Errno 5] Input/output error

問題は何だと思いますか?どうすれば修正できますか?

ベストアンサー1

おすすめ記事