<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>azechi_n</author_name>
  <author_url>https://blog.hatena.ne.jp/azechi_n/</author_url>
  <blog_title>日記</blog_title>
  <blog_url>https://azechi-n.hatenadiary.com/</blog_url>
  <categories>
    <anon>メモ</anon>
  </categories>
  <description>Windows環境のLibreOfficeマクロで、音声ファイルを指定した位置から再生したい。開始位置と再生時間をミリ秒単位で指定できるようにした。WindowsのLibreOfficeにはPythonの標準ライブラリを含めた実行環境が含まれている。追加のパッケージをインストールしないで使えるように、標準ライブラリの winsoundモジュールと waveモジュール だけを使って実現した。音声ファイルはあらかじめWAV形式に変換したものを使う。 import io import os import wave import winsound framerate_scale = 2 # 再生速度の…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fazechi-n.hatenadiary.com%2Fentry%2F2025%2F05%2F11%2F082911&quot; title=&quot;Pythonの標準ライブラリだけでWAVファイルをシークして再生する(Windowsの場合) - 日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-05-11 08:29:11</published>
  <title>Pythonの標準ライブラリだけでWAVファイルをシークして再生する(Windowsの場合)</title>
  <type>rich</type>
  <url>https://azechi-n.hatenadiary.com/entry/2025/05/11/082911</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
