{"action":"created","issue":{"url":"https://api.github.com/repos/alexylem/jarvis/issues/65","repository_url":"https://api.github.com/repos/alexylem/jarvis","labels_url":"https://api.github.com/repos/alexylem/jarvis/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/alexylem/jarvis/issues/65/comments","events_url":"https://api.github.com/repos/alexylem/jarvis/issues/65/events","html_url":"https://github.com/alexylem/jarvis/issues/65","id":167225210,"number":65,"title":"Speed / High pitch sound issue with JABRA Speaker with Raspberry Pi","user":{"login":"LengZai","id":20622767,"avatar_url":"https://avatars.githubusercontent.com/u/20622767?v=3","gravatar_id":"","url":"https://api.github.com/users/LengZai","html_url":"https://github.com/LengZai","followers_url":"https://api.github.com/users/LengZai/followers","following_url":"https://api.github.com/users/LengZai/following{/other_user}","gists_url":"https://api.github.com/users/LengZai/gists{/gist_id}","starred_url":"https://api.github.com/users/LengZai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LengZai/subscriptions","organizations_url":"https://api.github.com/users/LengZai/orgs","repos_url":"https://api.github.com/users/LengZai/repos","events_url":"https://api.github.com/users/LengZai/events{/privacy}","received_events_url":"https://api.github.com/users/LengZai/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alexylem/jarvis/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"alexylem","id":11017174,"avatar_url":"https://avatars.githubusercontent.com/u/11017174?v=3","gravatar_id":"","url":"https://api.github.com/users/alexylem","html_url":"https://github.com/alexylem","followers_url":"https://api.github.com/users/alexylem/followers","following_url":"https://api.github.com/users/alexylem/following{/other_user}","gists_url":"https://api.github.com/users/alexylem/gists{/gist_id}","starred_url":"https://api.github.com/users/alexylem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexylem/subscriptions","organizations_url":"https://api.github.com/users/alexylem/orgs","repos_url":"https://api.github.com/users/alexylem/repos","events_url":"https://api.github.com/users/alexylem/events{/privacy}","received_events_url":"https://api.github.com/users/alexylem/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexylem","id":11017174,"avatar_url":"https://avatars.githubusercontent.com/u/11017174?v=3","gravatar_id":"","url":"https://api.github.com/users/alexylem","html_url":"https://github.com/alexylem","followers_url":"https://api.github.com/users/alexylem/followers","following_url":"https://api.github.com/users/alexylem/following{/other_user}","gists_url":"https://api.github.com/users/alexylem/gists{/gist_id}","starred_url":"https://api.github.com/users/alexylem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexylem/subscriptions","organizations_url":"https://api.github.com/users/alexylem/orgs","repos_url":"https://api.github.com/users/alexylem/repos","events_url":"https://api.github.com/users/alexylem/events{/privacy}","received_events_url":"https://api.github.com/users/alexylem/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/alexylem/jarvis/milestones/4","html_url":"https://github.com/alexylem/jarvis/milestones/Pas%20pour%20tout%20de%20suite","labels_url":"https://api.github.com/repos/alexylem/jarvis/milestones/4/labels","id":1883173,"number":4,"title":"Pas pour tout de suite","description":"","creator":{"login":"alexylem","id":11017174,"avatar_url":"https://avatars.githubusercontent.com/u/11017174?v=3","gravatar_id":"","url":"https://api.github.com/users/alexylem","html_url":"https://github.com/alexylem","followers_url":"https://api.github.com/users/alexylem/followers","following_url":"https://api.github.com/users/alexylem/following{/other_user}","gists_url":"https://api.github.com/users/alexylem/gists{/gist_id}","starred_url":"https://api.github.com/users/alexylem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexylem/subscriptions","organizations_url":"https://api.github.com/users/alexylem/orgs","repos_url":"https://api.github.com/users/alexylem/repos","events_url":"https://api.github.com/users/alexylem/events{/privacy}","received_events_url":"https://api.github.com/users/alexylem/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2016-07-14T12:20:18Z","updated_at":"2016-10-09T16:13:33Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2016-07-24T09:26:56Z","updated_at":"2016-10-09T20:24:34Z","closed_at":null,"body":"### Description\r\n\r\nHi,\r\n\r\nAt first, thanks for your project, I really like it and I have started to test your project.\r\nI use a Raspberry Pi 3 and a Jabra Speaker MS510\r\nI got an issue to play 16000Hz sound.\r\nIt was very annoying because all my voices and Jarvis voice were very fast with a high pitched\r\n\r\nI finally found a fix to make it worked and i hope it will help someone else. Maybe you can add it to your code but i suppose you need to check the impact.\r\n\r\nAt first i told to my raspberry that i want my USB audio device as default\r\nSo i create (as i don't have it) the file alsa-base.conf\r\n```\r\n$cat /etc/modprobe.d/alsa-base.conf\r\n# This sets the index value of the cards but doesn't reorder.\r\noptions snd_usb_audio index=0\r\noptions snd_bcm2835 index=1\r\n\r\n# Does the reordering.\r\noptions snd slots=snd_usb_audio,snd_bcm2835\r\n```\r\n\r\nSo by default my audio device will be the Jabra speaker, even after rebooting the device\r\n\r\nWith the command $aplay -L\r\nI listed all my \"audio devices\" and i found that there is a line named sysdefault\r\n```\r\n$ aplay -L\r\nnull\r\n    Discard all samples (playback) or generate zero samples (capture)\r\npulse\r\n    PulseAudio Sound Server\r\nsysdefault\r\ndefault:CARD=USB\r\n    Jabra SPEAK 510 USB, USB Audio\r\n    Default Audio Device\r\nfront:CARD=USB,DEV=0\r\n    Jabra SPEAK 510 USB, USB Audio\r\n    Front speakers\r\nsurround21:CARD=USB,DEV=0\r\n    Jabra SPEAK 510 USB, USB Audio\r\n    2.1 Surround output to Front and Subwoofer speakers\r\nsurround40:CARD=USB,DEV=0\r\n    Jabra SPEAK 510 USB, USB Audio\r\n    4.0 Surround output to Front and Rear speakers\r\nsurround41:CARD=USB,DEV=0\r\n........\r\n```\r\n\r\nSo to find my issue i used \"aplay\" with -D option until i got the correct sound\r\nExample: `$aplay -Dsysdefault:CARD=USB -c 2 -f cd audio_test_from_pico2wave.wav`\r\n(it also works like this: `$aplay -Dsysdefault -c 2 -f cd audio_test_from_pico2wave.wav`)\r\n\r\nSo to fix my issue, i changed the file (generated and cleaned by jarvis.sh) `.asoundrc` by replacing **pcm.!default** by **pcm.!sysdefault**\r\nto get something like this\r\n```\r\n$cat ./.asoundrc\r\npcm.!sysdefault {\r\n  type asym\r\n   playback.pcm {\r\n     type plug\r\n     slave.pcm \"hw:0,0\"\r\n   }\r\n   capture.pcm {\r\n     type plug\r\n     slave.pcm \"hw:0,0\"\r\n   }\r\n}\r\n```\r\n\r\nAs you can see, even I plugged an USB audio device, I put hw:0,0 and not hw:1,0 as i set my USB audio device as default (to load the audio usb driver first) on the file alsa-base.conf"},"comment":{"url":"https://api.github.com/repos/alexylem/jarvis/issues/comments/252510300","html_url":"https://github.com/alexylem/jarvis/issues/65#issuecomment-252510300","issue_url":"https://api.github.com/repos/alexylem/jarvis/issues/65","id":252510300,"user":{"login":"taostaos","id":12157642,"avatar_url":"https://avatars.githubusercontent.com/u/12157642?v=3","gravatar_id":"","url":"https://api.github.com/users/taostaos","html_url":"https://github.com/taostaos","followers_url":"https://api.github.com/users/taostaos/followers","following_url":"https://api.github.com/users/taostaos/following{/other_user}","gists_url":"https://api.github.com/users/taostaos/gists{/gist_id}","starred_url":"https://api.github.com/users/taostaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taostaos/subscriptions","organizations_url":"https://api.github.com/users/taostaos/orgs","repos_url":"https://api.github.com/users/taostaos/repos","events_url":"https://api.github.com/users/taostaos/events{/privacy}","received_events_url":"https://api.github.com/users/taostaos/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T20:24:34Z","updated_at":"2016-10-09T20:24:34Z","body":"> \r\n> \r\n> Does it work is you pass the format to aplay?\r\n> \r\n> `aplay --rate=16000 --channels=1 --format=S16_LE tts.wav`\r\nNop, this doesn't work\r\n> \r\n> You can also use sox to convert:\r\n> \r\n> `sox tts.wav -r 44100 tts.wav`\r\n> \r\nYep this work.\r\n> "}}
{"actor":{"display_login":"taostaos"}}