Autor Tópico: Tocar som Wav no script  (Lida 5173 vezes)

Offline ra008

  • Usuário Ubuntu
  • *
  • Mensagens: 21
    • Ver perfil
Tocar som Wav no script
« Online: 03 de Fevereiro de 2007, 16:39 »
Ola estou usando um script que deve tocar um som de alerta no meio de sua execuçao. Estou utilizando o comando play mas ele abre uma "tela" enquanto o som esta sendo tocado e somente após a execução do som o script continua a rodar. Gostaria de saber como fazer para o som tocar e o script rodar ao mesmo tempo.
Obrigado

Offline Lamego

  • Usuário Ubuntu
  • *
  • Mensagens: 1.943
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #1 Online: 03 de Fevereiro de 2007, 16:42 »
Código: [Selecionar]
lamego@lamego-desktop:~$ play
bash: play: command not found
lamego@lamego-desktop:~$

Eu não tenho nenhum play....
João Luís Marques Pinto
Mais programs e jogos para o Ubuntu

Offline ra008

  • Usuário Ubuntu
  • *
  • Mensagens: 21
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #2 Online: 03 de Fevereiro de 2007, 16:49 »
Uso o edgy e ja veio instalado...

play (sox) 2.0-debian

Usage: play [OPTION]... FILE [EFFECT]...
Play/record sound files to/from unix style sound devices.

  -c, --channels=CHANNELS      specifies the number of sound channels in FILE
  -d, --device=DEVICE          use DEVICE for input/output
  -f, --format=FORMAT          specifies bit format of sample
                               FORMAT is either s, u, U, A, a, or g
  -r, --rate=RATE              sample rate in hertz of FILE
  -s, --size=SIZE              interpret size of sample
                               SIZE is either b, w, l, f, d, or D
  -t, --type=TYPE              specifies file format of FILE
  -v, --volume=VOLUME          change amplitude
  -x, --xinu                   reverse bit order of sample
                               (only works with 16-bit and 32-bit integer data)
      --file                   next argument is FILE
  -h, --help                   display this help and exit
      --version                output version information and exit
      --silent                 do not display filename of currently played file

EFFECTs are one or more of the following:  avg, band, chorus, copy, cut,
deemph, echo, echos, flanger, highp, lowp, map, mask, phaser, pick, polyphase
rate, repeat, resample, reverb, reverse, split, stat, vibro.

See sox man page for detailed information on supported file types, data
formats, and effect options.

DESCRIPTION
       play  and  rec  is  a command line front end to the sox(1) program.  It will play/record audio files to/from unix-
       style audio devices.  It can optionally apply audio effects to the file.

       When playing audio files, more then one input file can be specified.  If more than one is specified then they  are
       concatenated  together while playing.  In this case, it has a restriction that all input files must be of the same
       data type and sample rates.

       When playing audio files without headers, format options may be specified to inform sox of the files sample  rate,
       data size and encoding, and number of channels.  When recording audio data, this same information needs to be pre‐
       sented so that the audio device can be placed into the proper mode.


Offline Lamego

  • Usuário Ubuntu
  • *
  • Mensagens: 1.943
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #3 Online: 03 de Fevereiro de 2007, 16:54 »
Eu tambem tenho o edgy e não tenho esse comando :), deve ter sido instalado por algum pacote...
João Luís Marques Pinto
Mais programs e jogos para o Ubuntu

Offline ra008

  • Usuário Ubuntu
  • *
  • Mensagens: 21
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #4 Online: 03 de Fevereiro de 2007, 17:31 »
acho q foi o bumps...

Offline clcampos

  • Administrador
  • Usuário Ubuntu
  • *****
  • Mensagens: 10.790
  • .:: User Linux #439596 ::.
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #5 Online: 03 de Fevereiro de 2007, 20:16 »
Não sei qual pacote mas uso o Dapper e tenho ele instalado também

Código: [Selecionar]
~$ play
play: too few arguments
Try `play --help' for more information.
Cristiano/Timóteo - MG
.: Como Fazer Perguntas de Forma Inteligente :.                
Com dúvida? pesquise!

Offline leandrovargas

  • Usuário Ubuntu
  • *
  • Mensagens: 250
  • Ubuntu 7.04
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #6 Online: 03 de Fevereiro de 2007, 23:14 »
Uso o Edgy e tenho o play instalado também, mas não sei qual foi o pacote que instalou ele..

Vlw
SOFTWARE LIVRE, SOCIEDADE LIVRE.

Offline AlexBR

  • Usuário Ubuntu
  • *
  • Mensagens: 388
    • Ver perfil
Re: Tocar som Wav no script
« Resposta #7 Online: 04 de Fevereiro de 2007, 07:09 »

Código: [Selecionar]
sudo apt-get install alsa-utils
aplay arquivo.wav