re: morshutalk-v2 dev thread

Thinking about it some more, I might try to just always encode the audio into either ogg-opus or AAC for size (and fediverse compatibility) reasons. Making sure the sample rate, bit-depth, and bitrate target are set correctly is going to be Annoying but worthwhile since the purpose of this is to hook up to a markov-chain system where you can intercept (?) the generated text to add the audio to the post as an attachment.

Which is prooobably going to mean gently modifying Mame-Brot to make morshutalk-v2 calls within itself to post thataway. Eh, later me problem. Only matters once I have this up and functional consistently.

edit: unrelated to this but oh thank fuck, that old g2p_en library that the OG morshutalk used is just a weird fork of the actual g2p maintained by NRC-ILT. The only change I'd need to do (other than probably re-doing the phonemes from Morshu's lines) would be to manually invoke the language I/O to be eng and eng-aprabet, respectively.

Well, that's one major library hurdle dealt with.

#MorshuTalk_v2

re: morshutalk-v2 dev thread

Today's goal is to figure out audio transcoding in Python so I can always have this thing output a smaller file for uploading elsewhere. I don't want to rely on subprocess because that makes things too OS-specific (I at least want to know this works on Windows and Linux) and I don't want to deal with any kind of external calls that I can't guarantee will stay the same between systems or (major) versions.

I at least want to be able to output to one other audio format - and if I can get away with feeding the encoder the bytearray (and thus not writing a wav file), even better. Target bitrate is going to be "good enough for speech" (so Low) and sample rate is going to also be "good enough for speech" (still low).

I did wonder if it'd be possible to use a different bit-depth, but after digging into things yesterday it looks like Python doesn't like that - unless I went from 16-bit to 32-bit, but that's way more than I need and thus a much larger file than warranted.

Anyways. Y'all will find out what ends up happening today.

#MorshuTalk_v2 #Python

0

If you have a fediverse account, you can quote this note from your own instance. Search https://gts.social.senil.me/users/senil/statuses/01KD3F0WT6JK5E8NGBGMBY7CWB on your instance and quote it. (Note that quoting is not supported in Mastodon.)