Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
VoiceText Web APIでのGolang利用事例のご紹介
Search
tmaeda
January 21, 2015
Technology
2
2.1k
VoiceText Web APIでのGolang利用事例のご紹介
Golang meetup in Sapporo 2015/01/21 #sapgolang
tmaeda
January 21, 2015
Tweet
Share
More Decks by tmaeda
See All by tmaeda
アクターモデルの話
tmaedax
7
1.6k
Jupyter(主にnotebook)のご紹介
tmaedax
1
1.2k
それ NArray でできるよ
tmaedax
18
11k
AngularJSのご紹介
tmaedax
12
6.4k
静的型付き関数型言語のススメ
tmaedax
3
1.2k
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure:2024年10月度サービス・アップデート
oracle4engineer
PRO
0
140
Automated Tests Now and Future @ SQiP Workshop Special Lecture 2024
teyamagu
PRO
2
440
Azure AI servicesと歯のおはなし/AzureTravelers_Fukuoka2024_baba
nina01
1
110
MobileActOsaka_241018.pdf
akaitadaaki
0
100
From naive to advanced RAG: the complete guide
glaforge
0
620
生成AI入門
shukob
0
110
管理画面とユーザー機能の調和を取り戻す!~クエリパフォーマンス改善の成功物語~ / Restore harmony between administrative and user functions!
minisera
1
190
新入社員 オンボーディング改善プロジェクト - シンプルな仕組みで変革のきっかけを
enpipi
0
370
本番のトラフィック量でHudiを検証して見えてきた課題
joker1007
2
240
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
48k
Cosmos DB で持続可能な RAG を実現しよう!~ AOAI Dev Day ふりかえりを添えて / Sustainable RAG with Cosmos DB with recap AOAI Dev Day
miyake
0
170
運営11年目タイトルを守る最強の盾の有効性と活用法
mixi_engineers
PRO
2
120
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Code Review Best Practice
trishagee
63
17k
[RailsConf 2023] Rails as a piece of cake
palkan
49
4.8k
KATA
mclloyd
29
13k
Building Your Own Lightsaber
phodgson
102
6k
Pencils Down: Stop Designing & Start Developing
hursman
119
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.7k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Music & Morning Musume
bryan
46
6.1k
Transcript
7PJDF5FYU8FC"1* Ͱͷ(PMBOHར༻ࣄྫ ͷ͝հ !UNBFEB͑ʹ͠ςοΫ (PMBOHNFFUVQJO4BQQPSP
!UNBFEB w ג ͑ʹ͠ςοΫͰΤϯδχΞΛ͍ͯ͠·͢ɻ w3VCZͷࣄ͕ଟ͍Ͱ͢ɻ w࠷ۙ5ZQF4DSJQUͱ͔3FBDUͱ͔ JQZUIPO QBOEBTͱ͔ʹڵຯ͕͋Γ·͢ɻ wԑ͋ͬͯɺ͙͜͜Β͍গ͚ͩ͠(P͍ͬͯ ·͢ɻ
ຊͷ͓ w7PJDF5FYU8FC"1*ͷ͝հ w(PΛͬͯΈͯͷײ
7PJDF5FYU8FC"1* w)0:"αʔϏεגࣜձ༷͕ࣾӡӦ͍ͯ͠Δߴ ࣭Ի߹αʔϏεͰ͢ɻ w8FC"1*ͷΠϯλʔϑΣʔε෦ฐࣾͰ։ൃ ͷ͓ख͍Λ͖ͤͯ͞·ͨ͠ɻ
7PJDF5FYU8FC"1* curl "https://api.voicetext.jp/v1/tts" \ -o "test.wav" \ -u "YOUR_API_KEY:" \
-d "text=͓Α͏͍͟͝·͢" \ -d “speaker=hikari" \ -d “emotion=happiness” \ -d “emotion_level=2”
7PJDF5FYU8FC"1*ͷߏ Portal(Rails) Wrapper (Go)! ར༻ऀ VoiceText Engine Ի߹αʔόʔ Heroku Postgre!
SQL ɾϩά ɾϢʔβʔ ೝূɺϩάॻࠐ Ϣʔβʔ! ొ Ϣʔβʔొ LoadBalancer APIར༻
গ͠ͷؒɺσϞ͔ͶͯɺVoiceText Ͱ͠·͢ɻ showͰ͢ɻςϨϏ౦ژܥྻʮϞϠ ϞϠ͞·͊ʙͣ2ʯͱ͍͏൪ͷφ ϨʔγϣϯΛ୲͍ͯ͠·͢ɻ
ͳͥ(Pʁ wͱฒྻੑ w$ͷϥΠϒϥϦͱͷੑ w։ൃޮ hikariͰ͢ɻ
ͳͥ(Pʁ wͱฒྻੑ w$ͷϥΠϒϥϦͱͷੑ w։ൃޮ takeruͰ͢ɻ
ͳͥ(Pʁ wͱฒྻੑ w$ͷϥΠϒϥϦͱͷੑ w։ൃޮ harukaͰ͢ɻ
ͳͥ(Pʁ wͱฒྻੑ w$ͷϥΠϒϥϦͱͷੑ w։ൃޮ bearͰ͢ɻ
σϞ͓͠·͍ santaͰ͢ɻ
ྑ͔ͬͨͱ͜Ζ GoΛͬͯΈͯ
࣮ߦ w$΄ͲϝϞϦཧϙΠϯλͷཧʹؾΛΘ ͳͯ͘ࡁΉ͕ɺ$ͱಉఔͷ͕ͰΔɻ wHPSPVUJOFͱDIBOOFMΛར༻ͯ͠ɺൺֱత؆୯ʹ ϚϧνίΞΛ׆͔͢ฒྻϓϩάϥϛϯά͕Ͱ͖ Δɻ
$ͱͷੑ wඞཁ࠷খݶͷखଓ͖ Ͱɺ$Ͱॻ͔Εͨ֎ ෦ϥΠϒϥϦͷؔ Λݺͼग़ͤΔɻ package rand ! /* #include
<stdlib.h> */ import "C" ! func Random() int { // Cͷੈքͷrandom()ؔΛݺͼग़ͯ͠ // ݁ՌΛgoͷੈքͷintʹมͯ͠ฦ͢ return int(C.random()) } ! func Seed(i int) { // goͷੈքͷintܕͷiΛCͷੈքͷuintʹมͯ͠ɺ // CͷੈքͷsrandomؔʹҾͱͯ͢͠ C.srandom(C.uint(i)) }
੩తνΣοΫ wίϯύΠϧ࣌ʹ੩తܕνΣοΫ͕ಇ͘ͷͰɺ ͠ΐʔͳ͍ϛείϯύΠϧ࣌ʹ͛Δɻ wͦͷଞɺએݴͨ͠ͷʹͬͯͳ͍มͱ͔ɺͬ ͯͳ͍ύοέʔδͱ͔ࢦఠͯ͘͠Εͯɺ݁ߏ ɻ
ॆ࣮ͷϥΠϒϥϦ wඞཁ࠷ݶͷϥΠϒϥϦඪ४Ͱଗ͍ͬͯΔɻ wɺจࣈྻɺਖ਼نදݱɺྻNBQͳͲͷ ίϯςφɺ࣌ؒɺύʔαʔɺ04ɺωοτϫʔ Ϋɺ҉߸ɺѹॖɺϩάͳͲͳͲɻ wΦʔϓϯιʔεͷϥΠϒϥϦ͍Ζ͍Ζ͋Δɻ
γϯϓϧͳݴޠ༷ wΫϥεͳ͍͚ͲɺܕʹϝιουΛੜͤΔͷͰ ࠔΒͳ͍ɻ wྫ֎ॲཧػೳͳ͍͚ͲɺෳฦΓͰͦΜͳʹ ࠔΒͳ͍ɻ w(FOFSJDTͳ͍͚ͲɺྻͱNBQͰཁૉͷܕΛ ࢦఆͰ͖ΔͷͰɺଟ͘ͷέʔεͰࠔΒͳ͍ɻ
HPGNU wݴޠඪ४ͷίʔσΟϯάن͕͋ͬͯɺHPGNUί ϚϯυΛ͏ͱܗͰ͖ΔͷͰɺίʔσΟϯά نʹ·ͭΘΔफڭઓ૪͕ى͖Δස͕গͳ͍ɻ
ݴޠ༷͕҆ఆ w݁ߏසൟʹ(PͷόʔδϣϯΞοϓ͕ߦΘΕΔ ͕ɺେ͖͘ڍಈ͕มΘͬͯޓੑͷ͕ى͖ Δɺͱ͍͏͜ͱ͕͋·Γͳ͔ͬͨʢগͳ͘ͱ ͜Ε·Ͱʣɻ
ͪΐͬͱෆຬͳͱ͜Ζ
දݱྗ͕গͳΊ w(FOFSJDTཉ͍͠ wతσʔλܕͱύλʔϯϚονཉ͍͠
ϥΠϒϥϦͷػೳ࣭ w͍ظؒɺଟ͘ͷਓʹ͍ࠐ·Εͨڥ +BWBͱ ͔3VCZͱ͔ ͱൺֱ͢ΔͱɺϥΠϒϥϦͷػೳ ࣭͕·ͩख़͍ͯ͠ͳ͍ײ͡ɻ wࣗಈςετڥ wจࣈίʔυมʢ͍ΘΏΔʮμογϡʯ ͱ͔ʣ wGPSL
FYFDඇޮ
·ͱΊ
·ͱΊ wଟগͷෆຬ͋Δͷͷɺશମతʹඇৗʹ όϥϯεͷऔΕͨྑ͍ݴޠɾڥͰେม࣮༻త ͳͷͰେม͓͢͢ΊͰ͖·͢ɻ w7PJDF5FYU8FC"1*ΛͲ͏ͧ͝ርʹɻ ͬͯgolang