# Frequencies and time arays for spectrogram

**URL:** <https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438>\
**Category:** audio\
**Created:** [September 11, 2024, 9:11pm UTC](https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438 "2024-09-11T21:11:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sammlapp](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sammlapp/32/36795_2.png) [@sammlapp](https://discuss.pytorch.org/u/sammlapp)\
**Post date:** [September 11, 2024, 9:11pm UTC](https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438/1 "2024-09-11T21:11:28Z")

</div>

When we use the torchaudio.transforms.spectrogram transform we get a 2d array with dimensions corresponding to frequency and time. The exact frequencies and times of rows and columns depend on the spectrogram parameters.

The APIs for librosa and scipy.signal either directly return these values along with the spectrogram or provide other means of getting these values. Without them, interpretation of the output is difficult, and users are likely to try to manually create the time and frequency series - but are likely to be guessing at edge cases like how the window functions behave at the beginning and end of the audio signal - which will result in off-by-one and similar errors.

I was going to open this as a feature request on the torchaudio issues page, but there is a note saying that the issues are no longer monitored. Please let me know if torchaudio is deprecated or if there is a better place to post this question. Thanks

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [September 12, 2024, 1:34pm UTC](https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438/2 "2024-09-12T13:34:32Z")

</div>

> [@sammlapp](#):
>
> but there is a note saying that the issues are no longer monitored

Could you link to this note here, please?

---

<div class="post-metadata">

**Author:** ![sammlapp](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sammlapp/32/36795_2.png) [@sammlapp](https://discuss.pytorch.org/u/sammlapp)\
**Post date:** [October 8, 2024, 4:45pm UTC](https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438/3 "2024-10-08T16:45:55Z")

</div>

oops sorry for delay. For example if I go to create an issue:

> **[Build software better, together](https://github.com/pytorch/audio/issues/new?assignees=&labels=&projects=&template=bug-report.yml)**
>
> GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

There is all-caps bold text below the Add a Title field:

**PLEASE NOTE THAT THE TORCHAUDIO REPOSITORY IS NO LONGER ACTIVELY MONITORED.** You will not likely get a response. For open discussions, visit [https://discuss.pytorch.org/](https://discuss.pytorch.org/).

---

<div class="post-metadata">

**Author:** ![ptrblck](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/32/1823_2.png) [@ptrblck](https://discuss.pytorch.org/u/ptrblck)\
**Post date:** [October 8, 2024, 8:41pm UTC](https://discuss.pytorch.org/t/frequencies-and-time-arays-for-spectrogram/209438/4 "2024-10-08T20:41:36Z")

</div>

Thanks for sharing this message!  
Let me add @moto to help with this question if possible.
