是否可以在 Sphinx 文档工具的 html 输出中嵌入音频文件?

Is it possible to embed an audio file in the html output of the Sphinx documentation tool?

可能没有用于在 html 输出中嵌入音频文件的特定 指令 ,但是否可以至少嵌入一个 html执行此操作的代码,例如:

<audio controls="controls">
  <source src="foo.wav" type="audio/wav">
  Your browser does not support the <code>audio</code> element. 
</audio>

如果是,怎么做?

更新: 好的,我设法解决了这个问题,只需将其添加到 .rst 文档中:

.. raw:: html

   <audio controls="controls">
         <source src="_static/foo.wav" type="audio/wav">
         Your browser does not support the <code>audio</code> element. 
   </audio>

但是,我必须手动将 foo.wav 文件复制到 _build/html/_static。这还不错,但我想知道这是否可以自动完成,如果我可以保留音频文件,比如 docs 根目录中的 audio 目录...?!?

使用 raw 指令。

.. raw:: html

    <audio controls="controls">
      <source src="foo.wav" type="audio/wav">
      Your browser does not support the <code>audio</code> element. 
    </audio>