Jump to content

Photo

How to Produce Voice


13 replies to this topic

#1 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • 335 posts
  • Location:$5787

Posted Mon Jan 1, 2018 4:30 AM

Good Morning,

 

 I'm interested in learning a little bit about producing voice.  Can anyone please point me in the right direction? I suppose I need to learn how to convert a sound file to Atari readable data, and also need a voice engine? How much memory does say, 1 second of sample use? How many cycles would I have left over for a kernel if I wanted to show something on the screen during speech?

 

Thanks!


  • haroldoop likes this

#2 BigO OFFLINE  

BigO

    River Patroller

  • 4,381 posts
  • Location:Phoenix, AZ

Posted Mon Jan 1, 2018 9:02 AM

One discussion on the subject: http://atariage.com/...un#entry2341279

Seems like that might give you a pretty good start toward understanding the subject.  (I found that by searching this forum for "Quadrun" which is a game that produces human speech sounds natively on the 2600 hardware.)

 

There's a device called Atarivox if you're interested in an external device to produce speech.


  • RevEng and BNE Jeff like this

#3 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Thu Jan 11, 2018 6:31 PM

Thanks..  I have the sample player pretty much how I want it now but I still need a tool to convert files to 4 bit (high and low nibbles in one byte) 

 

Anybody know of anything?  The link points to a perl script which I'm trying to figure out, but I'm wondering if there is something better and easier.



#4 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,259 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Fri Jan 12, 2018 9:07 AM



I still need a tool to convert files to 4 bit (high and low nibbles in one byte) 

 

 

 

This is what I used for Draconian

Attached File  raw_to_dpc.zip   1.56KB   28 downloads
 
Samples need to first be converted to unsigned 8 bit raw format, which I used sox to create:
../sox $file -b 8 -u $root.raw
../raw_to_dpc $root.raw $root.pds

  • BNE Jeff likes this

#5 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 13, 2018 7:01 AM

Thanks!  I think I got through it all except my computer doesn't recognize pds.  Is that Power Director Script?  Opening it with JEdit doesn't look like much.

Attached Files



#6 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,259 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Jan 13, 2018 8:40 AM

I made that up, PDS = Packed Digital Samples

It's a binary file, not text, so use INCBIN to include it in your source:
incbin sample.pds
 
Hmm,need to put spacing in front of the incbin, the forum keeps removing it for some reason - probably because I'm on my iPad.

#7 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 13, 2018 8:51 AM

OK Thanks.  I'll work on it.  I forgot to mention also.. the switch -u was not recognized so I used

-e unsigned-integer


#8 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 13, 2018 9:32 AM

\sox-14-4-2>raw_to_dpc shining.raw incbin shining.pds

Hmm..  Doesn't like that..  Where does it go?



#9 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,259 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Jan 13, 2018 10:44 AM

It's a C program.  Provided it compiled correctly for you, it should run from the local directory just fine:

Darrells-Mac-Pro:samples darrellspice$ ./raw_to_dpc
Usage: raw_to_dpc.h <infile> <outfile>


#10 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 13, 2018 11:33 AM

OK..   I was getting that.  I thought that was it telling me I wasn't giving it what it expected. SS 1-13-18.jpg

 

Though I don't see any result from running it.



#11 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,259 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sat Jan 13, 2018 11:52 AM

:!: INCBIN goes in your 6507 source code.  
 
sample_alert:
    INCBIN "./samples/alert.pds"
sample_alert_size = * - sample_alert 
 
  • BNE Jeff likes this

#12 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 20, 2018 5:00 AM

Thanks..  Still having a tough time with this. Its in my source, and it compiles.  But there's still something wrong and it doesn't run.   When it loads in JEdit, I get:

C:\Atari\dasm\Shining.bin:
The file could not be loaded correctly (some data might be lost) with
the encoding "Cp1252".
(java.nio.charset.UnmappableCharacterException: Input length = 1)
Try selecting a different encoding.
It can be selected with the menu File->Reload with Encoding.
If you want it to be done automatically, add the candidates into
"List of fallback encodings" in Encodings pane of Global Options.

and Stella's disassembly doesn't look so good.

 

Is the .pds supposed to be just 4 bit sample data or is there more to it?

 

[edit:  I added the .asm]

Attached Files


Edited by BNE Jeff, Sat Jan 20, 2018 5:26 AM.


#13 Sheddy OFFLINE  

Sheddy

    Dragonstomper

  • 730 posts
  • Location:UK

Posted Sat Jan 20, 2018 5:23 AM

I guess jedit is expecting text. It's a binary file, ie raw data. Most editors don't crash due to that though, which is totally down to the editor. You need something like a hex editor if you want to poke around the raw data

#14 BNE Jeff OFFLINE  

BNE Jeff

    Moonsweeper

  • Topic Starter
  • 335 posts
  • Location:$5787

Posted Sat Jan 20, 2018 7:22 AM

Apparently I tried doing a jsr to it at some point.  If I remove that, it at least makes noise.  If it is just 4 bit samples, I suspect my sample rate and length don't match..

Attached Files






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users