<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Peadar Coyle on Medium]]></title>
        <description><![CDATA[Stories by Peadar Coyle on Medium]]></description>
        <link>https://medium.com/@peadarcoyle?source=rss-3516b91ea59------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LQLlRVyqYdg-t-sOwU0jaw.jpeg</url>
            <title>Stories by Peadar Coyle on Medium</title>
            <link>https://medium.com/@peadarcoyle?source=rss-3516b91ea59------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:48:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@peadarcoyle/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating an Alexa Audio Streaming Skill with api.audio]]></title>
            <link>https://peadarcoyle.medium.com/creating-an-alexa-audio-streaming-skill-with-api-audio-af776701e926?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/af776701e926</guid>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[alexa-skills]]></category>
            <category><![CDATA[audio]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Fri, 10 Sep 2021 14:33:32 GMT</pubDate>
            <atom:updated>2021-09-10T14:33:32.826Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article explains how you can create a simple Alexa Skill from scratch using api.audio content. First, we will create a personalized newscast and then, build an Alexa skill that is able to play the audio files generated using api.audio.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*3ZUHGco7mhEEh2hF.jpeg" /></figure><h3>Introduction</h3><p>In this blog post we will create a simple Alexa Skill from scratch using <a href="https://console.api.audio/">api.audio</a> content. The focus of this blogpost is to give a detailed overview on how to create alexa skills, and how to connect them with an external api (api.audio) to produce and retrieve audio content based on user’s request. Finally, we will also explain how to test it using the Alexa Developer Console, the Alexa phone App, and your Echo devices. Special thanks to <a href="https://vozlab.co.uk/">VozLab</a> for collaborating with us on this. More about VozLab can be found at the end of this article.‍</p><p>First, we will review and install all the necessary tools we need, then we will create audio content using <a href="http://api.audio/">api.audio</a>, in this case a personalized newscast. Finally, we will connect the Alexa skill with the api.audio API, deploy and test with an Echo device and the Alexa App.‍</p><h3>Preparing the tool</h3><p>‍First of all, let’s check we have all the tools before we start:‍</p><p><strong>1.</strong><a href="http://api.audio/"> <strong>Api.audio</strong></a><strong> Account</strong> — Create an account in <a href="https://console.api.audio/">api.audio Console</a>.‍</p><p><strong>2. Alexa Developer Account</strong> — Create an account in the <a href="https://developer.amazon.com/dashboard">Alexa Developer Console</a>.‍</p><p><strong>3. Amazon Web Services (AWS) Account</strong>- Create an account in the <a href="https://console.aws.amazon.com/console/home">AWS Console</a>.‍</p><p><strong>4. IAM user </strong>— Login into your AWS Account and search for the IAM service. Create an IAM user with the necessary permissions and at least programmatic access. If you don’t know how to do that, don’t panic and follow <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html">this simple guide</a>. Make sure you copy your AWS Access Key ID and your AWS Secret Access Key. You will need it for the next step.‍<a href="https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html">‍</a></p><p><strong>5.</strong><a href="https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html"> <strong>AWS CLI v2</strong></a> — Download the AWS Command Line interface. Once it’s installed, just do:</p><p>‍aws configure‍</p><pre>aws configure<br>    <em># AWS Access Key ID []: your-iam-user-access-key-id</em><br>    <em># AWS Secret Access Key []: your-iam-user-secret-access-key</em><br>    <em># Default region name []: eu-west-1</em><br>    <em># Default output format []: json</em><br><em># now test if aws cli is configured correctly.</em><br>aws sts get-caller-identity<br>    <em># {</em><br>    <em>#    &quot;UserId&quot;: &quot;...&quot;,</em><br>    <em>#    &quot;Account&quot;: &quot;...&quot;,</em><br>    <em>#    &quot;Arn&quot;: &quot;arn:aws:iam::...:user/youriamusername&quot;</em><br>    <em># }</em>‍</pre><p><strong>6. node.js &amp; npm</strong> — Download it from <a href="https://nodejs.org/en/">here</a>‍</p><p><strong>7. Alexa Skills Kit (ASK) SDK v2</strong> — Install <a href="https://developer.amazon.com/en-US/docs/alexa/sdk/alexa-skills-kit-sdks.html">your preferred ASK SDK</a>, but for this tutorial we will use the SDK v2 for node.js. At the moment of writing, there are 3 SDK’s available: python, javascript (node.js) and php. To install the javascript SDK just do:‍</p><pre>npm install --save ask-sdk</pre><p>‍<strong>8. Alexa Skills Kit (ASK) CLI</strong> — Install it following the official <a href="https://developer.amazon.com/en-US/docs/alexa/smapi/quick-start-alexa-skills-kit-command-line-interface.html">AWS guide.</a> Useful command line interface tool to easily manage and debug your Alexa Skill‍</p><pre>npm install -g ask-cli‍</pre><p><strong>9. VS Code</strong> — Install it from <a href="https://code.visualstudio.com/">here</a>‍</p><p><strong>10. VS Code ASK extension</strong> — Extension to use ASK SDK in VS code. Install instructions <a href="https://developer.amazon.com/en-GB/docs/alexa/ask-toolkit/get-started-with-the-ask-toolkit-for-visual-studio-code.html">here</a>.‍</p><p><strong>11. Apiaudio Alexa Streaming Skill Github Repo</strong> — Download from <a href="https://github.com/aflorithmic/alexa">here</a> or just:‍</p><pre>git clone git@github.com:aflorithmic/alexa.git‍</pre><p><strong>12. Amazon Alexa</strong> Phone app</p><p>Download the official Amazon Alexa app on your mobile phone, as this will be very useful for testing. Once it has downloaded, sign in using the Alexa developer account you created in step 2. Also change the <em>language</em> of the Alexa App to English (US).‍</p><p><strong>13. </strong>(Optional) <strong>Amazon Alexa Echo Device</strong>‍</p><p>If you have one of these — great! Just make sure in the Alexa phone app (see 12), that the app is linked with your new user. Go to <em>More/Settings/Device Settings</em> and click on the + symbol <em>/Add Device/Amazon Echo</em> and select your Echo device. That’s it!‍</p><p>Tools ready? Let’s start.‍</p><h3>Creating Audio content with <a href="https://github.com/aflorithmic/alexa">api.audio</a></h3><p>‍First, let’s create some Audio content using <a href="http://api.audio/">api.audio</a>. In this case, we will generate a personalized newscast for each user. Have a listen to Sam’s personal newscast:</p><p><a href="https://file.api.audio/mynews__username_sam.mp3">https://file.api.audio/mynews__username_sam.mp3</a> (This will trigger an mp3 download. No worries, it isn’t malware)‍‍</p><p>Sounds good doesn’t it? Everything was automatically generated in seconds by api.audio.‍</p><p><strong>1. </strong>Go to <a href="https://console.api.audio/">console.api.audio</a> and copy your api-key.‍</p><p><strong>2.</strong> Create a new <strong><em>example.js </em></strong>file and copy the following code. You can also copy the code directly <a href="https://github.com/aflorithmic/alexa/blob/master/apiaudio_example/example.js">from github</a>. Make sure you paste your api-key in the second line of code. Of course, feel free to modify the text!‍</p><pre>const apiaudio = require(&quot;apiaudio&quot;).default<br>apiaudio.configure({ apiKey: &quot;your key here&quot;});<br>text = `<br>    &lt;&lt;soundSegment::intro&gt;&gt;<br>    &lt;&lt;sectionName::intro&gt;&gt; <br>    Hey {{username}}, London underground to get full mobile network by end of twenty twentyfour.<br>    The first stations to be connected, will include Bank, <strong>and</strong> Oxford Circus. &lt;<strong>break</strong> time=&quot;2s&quot;/&gt;<br>    &lt;&lt;soundSegment::main&gt;&gt;<br>    &lt;&lt;sectionName::main&gt;&gt; <br>    London mayor, who was re elected last month said. I promised Londoners that <strong>if</strong> they re elected <br>    me <strong>for</strong> a second term <strong>as</strong> a mayor, I would deliver four gee throughout the tube network.<br>    Transport <strong>for</strong> London explained that work on some of the capitals busiest station, including <br>    Oxford Circus <strong>and</strong> Tottenham Court Road would begin soon, <strong>with</strong> plans <strong>for</strong> them to be among the <br>    first fully connected stations by the end of next year.<br>    &lt;&lt;soundSegment::outro&gt;&gt;<br>    &lt;&lt;sectionName::outro&gt;&gt;<br>    &lt;<strong>break</strong> time=&quot;1s&quot;/&gt; This news was delivered to you by Always Up To Date.<br>    Check out our webpage <strong>for</strong> the latest news. <br>    &lt;&lt;soundEffect::effect1&gt;&gt;<br>    `<br>template = &quot;headlines&quot;<br>audience = {&quot;username&quot;: &quot;Sam&quot;}async function create_audio(text, template, audience){<br>    <strong>try</strong> {<br>        const script = await apiaudio.Script.create({ scriptText: text, scriptName: &quot;mynews&quot; })<br>        console.log(&quot;scriptId: &quot;, script.scriptId)<br>        const speechRequest = await apiaudio.Speech.create({ scriptId: script.scriptId, voice: &quot;en-GB-RyanNeural&quot;, audience:[audience]});<br>        const masteringRequest = await apiaudio.Mastering.create({scriptId: script.scriptId, public: true, soundTemplate: template, audience:[audience]});<br>        const masteringResult = await apiaudio.Mastering.retrieve(script.scriptId, audience, _public=true);<br>        console.log(masteringResult.url)<br>        <strong>return</strong> masteringResult.url<br>    } catch (e) {<br>        console.error(e);<br>    }<br>};create_audio(text, template, audience)‍</pre><p><strong>3. </strong>Run the script:‍</p><pre>node example.js<br>  <em># scriptId:  293y2d6e-d79a-49aa-b901-4232ca67ac7d</em><br>  <em># </em><a href="https://ms-file-mastering-public-prod.s3.amazonaws.com/aflr-a8e36432/default/default/mynews/mynews__username~sam.mp3"><em>https://ms-file-mastering-public-prod.s3.amazonaws.com/aflr-a8e36432/default/default/mynews/mynews__username~sam.mp3</em></a>‍</pre><p><strong>4. </strong>DONE! You already have your news produced! Just copy the url in the browser, and have a listen 😉 You should get an .mp3 file back!‍</p><p><strong>5.</strong> Copy the <strong><em>scriptId</em></strong> generated, you’ll need it for the next part of the tutorial.‍</p><p>Do you want to go a step further and grab the news copy from a News API to produce it on the fly based on user preferences? Stay tuned, we will do this in the next tutorial 😉‍</p><h3>Creating your Alexa Skill with ASK SDK for javascript‍</h3><p>So we are done with the <a href="https://www.api.audio/">api.audio</a> part. We already have our newscast, and now we want to create an Alexa Skill that can reproduce personalized news for each user. We want something like this. In this video we are producing the speech and mastering audio on the fly. Quite impressive — right? 😎</p><h3>‍‍Let’s create our Alexa skill real quick:‍</h3><p><strong>1. </strong>Clone the <a href="https://github.com/aflorithmic/alexa">github repo</a>. We have prepared a simple Alexa Skill for you. This is already using <a href="https://www.api.audio/">api.audio</a> under the hood. If you did this previously step you can continue.‍</p><pre>git clone git@github.com:aflorithmic/alexa.git‍</pre><p><strong>2. </strong>Install the dependencies first (run this command in the /alexa folder):‍</p><pre>(cd <strong>lambda</strong>/ &amp;&amp; npm install)</pre><p><strong>3. </strong>Init ASK to configure our alexa skill‍</p><pre><em># say yes when asked to override, then say yes to everything</em><br>ask init</pre><p>‍‍Now our Alexa Skill is configured, and all the code is already built for you, let’s review the folder structure and the important parts of the code. For an in-detail explanation I recommend the official documentation <a href="https://developer.amazon.com/en-US/docs/alexa/alexa-skills-kit-sdk-for-nodejs/develop-your-first-skill.html#launchrequest">here</a>:‍</p><ul><li><strong><em>lambda</em></strong> folder — Here is where the Alexa Skill logic is found. It’s called lambda because of lambda functions, which is the serverless service that Alexa uses under the hood to run the code. When you deploy, the code inside this folder will be sent to a lambda function, so it contains all the node modules, the package.json and package-lock.json files, as well as the javascript logic of the Alexa Skill (node.js). The function that connects apiaudio with the Alexa skill can be found in the <strong><em>util.js </em></strong>file.‍</li><li><strong><em>skill-package</em></strong> folder — Here you find the <strong><em>skill.json</em></strong> file (also known as <a href="https://developer.amazon.com/en-US/docs/alexa/smapi/skill-manifest.html">Skill Manifest</a>) which has the general configuration of the skill, such as the locales (a.k.a. languages) supported (in our case is only en-US but feel free to add more), the invocation name per language, as well as the category of the Alexa Skill. Also in this folder you’ll find the <strong>InteractionModels</strong> folders which contains the configuration of the interaction model for each language. This is a vital part of the skill. In the <strong><em>interactionModels/custom/en-US.json </em></strong>file you can set the invocationName of the skill (in our case “api audio maker”). So, for example, to open your skill in your alexa device you’ll say: “alexa, open api audio maker”. Feel free to play with this. Then you have the <strong>intents</strong>, which allow you to set different types of “voice actions/queries” for your skill. In this case, we only have 1 intent set up: <strong><em>PlaySoundIntent </em></strong>that will allow the Alexa Skill user to trigger a Lambda function based on the user query. You can also grab information from the response of the user. In this example, we are grabbing the name of the user.‍</li></ul><p>In the<strong><em> lambda/index.js </em></strong>file, you’ll find the Alexa Skill logic. The important bits are:‍</p><ul><li>LaunchRequestHandler (line 4) — Here you have the logic that handles the launch request from Alexa. This is the function triggered when you invoke the lambda by saying: “Alexa, open api audio maker”.‍</li><li>PlaySoundIntentHandler (line 84) — Here you have the logic that handles our PlaySoundIntent created in the <strong><em>interactionModels/custom/en-US.json </em></strong>file.‍</li></ul><p>In the <strong><em>lambda/util.js </em></strong>file you’ll find the code used from the index.js handlers to connect with <a href="https://www.api.audio/">api.audio</a> and create/retrieve personalized audio. More on that in the following section.‍</p><h3>Connecting your <a href="http://api.audio/">api.audio</a> content with your Alexa Skill‍</h3><p>Before deploying, let’s copy the scriptId and the api-key in our <strong><em>util.js </em></strong>code, otherwise it won’t work.‍</p><p><strong>1. </strong>Go to<strong><em> lambda/util.js</em></strong> (lines 5–6) and paste the apiaudio api-key and the scriptId you created in the previous section.‍</p><pre><em># lambda/util.js lines 5-6</em><br>apiaudio.configure({ apiKey: &quot;your apikey here&quot;});<br>const SCRIPT_ID = &quot;your scriptid here&quot;‍</pre><p><em>Please note this is an example and we try to simplify things. For a production version, we HIGHLY recommend that you use environment variables and never hardcode api keys in your code and/or github repositories.</em>‍</p><p>That’s it. The code in util.js should be self-explanatory. Please check <a href="http://docs.api.audio/">docs.api.audio</a>, <a href="https://docs.api.audio/docs/speech-resource-1">Speech</a> resource and <a href="https://docs.api.audio/docs/mastering-resource-1">Mastering</a> resource.‍</p><h3>Deploy alexa skill‍</h3><p>The code is ready, we are only missing one thing, deploying the code from our computer to AWS servers. Let’s do it:‍</p><p><strong>1. </strong>Deploy your new Alexa Skill. Just do:‍</p><pre>ask deploy‍</pre><h3>Testing your Alexa Skill‍</h3><p>The Skill has been deployed, now it’s time to test it.‍</p><p>You have several options for testing:</p><p><strong>1.</strong><a href="https://www.amazon.com/ap/signin?openid.pape.preferred_auth_policies=Singlefactor&amp;clientContext=132-6477776-6456237&amp;openid.pape.max_auth_age=7200000&amp;openid.return_to=https%3A%2F%2Fdeveloper.amazon.com%2Falexa%2Fconsole%2Fask&amp;openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.assoc_handle=amzn_dante_us&amp;openid.mode=checkid_setup&amp;marketPlaceId=ATVPDKIKX0DER&amp;openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&amp;"><strong> </strong>Alexa Developer Console</a> — This is the easiest. Just go to the link provided and click on your Alexa Skill. Then go to the <strong>Test</strong> tab and write “open api audio maker”. The only problem with the Developer Console is that the audioPlayer directives (used to play the audio coming from <a href="http://api.audio/">api.audio</a>) doesn’t work and thus you cannot listen the audio coming from the api. But this is a great solution for testing that your skill works.‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*KQtLZZptAxmDhs0u" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*VEw4-WBMqv6qR8oA.png" /></figure><p>‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*sTISJwvikXC2wTIR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*43v_6WYw69t8fkP3.png" /></figure><p>‍</p><p><strong>1.</strong> Using <strong>ASK CLI in your terminal.</strong> Run the following command to run the app in local:‍</p><pre>ask run</pre><p><strong>2.</strong> Now open a new terminal window, and run the following command:‍</p><pre>ask dialog</pre><p>In the dialog tab you can type “open api audio maker” and your skill should respond. Again, audioPlayer directives are not supported in the terminal.‍</p><p><strong>3.</strong> Using <strong>VSCode’s Alexa Skill plugin.</strong> Similar to the 1st option, but can be used in your local machine, inside VSCode. Also does not allow for AudioPlayer directives.‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*VGuAg3ELObiBrXo3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*XNRTSajHfi7kFUiG.png" /></figure><p>‍</p><p><strong>4. </strong>Using <strong>Alexa Phone App</strong>. This is the first testing mechanism that allows us to play the audio and have an end-to-end testing experience. Just open the app and click on the Alexa Icon so the app starts to record, and say: “open api audio maker”, and after the welcome message, just say: “open &lt;yourname&gt;”. This will automatically render your name and produce personalized news. If it does not work, please check the language settings, and remember it has to be exactly the same as the skill locales (in this case, must be English US).‍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*hz_Yr4jd9_99Ec9n" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*TF1_aFCNq8bF9lUY.png" /></figure><p>‍</p><p><strong>5. </strong>Using an <strong>Echo device</strong>. If your echo device is linked to the Alexa App account and using English US as main language, you will be able to run your skill directly by talking to your Echo device “Alexa, open api audio maker”.‍</p><h3>Final result</h3><h3>‍‍Next steps‍</h3><p>Are you happy with the results? Would you like to create your own <em>skill</em> using <a href="http://api.audio/">api.audio</a> and certify your skill, so it can be put onto the official Alexa Skill Store?‍</p><p>Please let us know and we will provide you with guidance and a more in-depth tutorial!</p><p>‍‍</p><p><strong>Do you want to know more?</strong></p><ul><li><a href="https://www.aflorithmic.ai/post/api-video-aflorithmic-ai-localize-advertisement-videos-with-personalized-voice-overs">Api.video + api.audio: Localize Advertisement Videos with Personalized Voice Overs</a></li><li><a href="https://www.aflorithmic.ai/post/introducing-the-worlds-largest-artificial-voice-library">Introducing: The World’s Largest Artificial Voice Library!</a></li><li><a href="https://www.aflorithmic.ai/post/creating-personalized-audio-ads">Creating Personalized Audio Ads</a></li><li><a href="https://www.aflorithmic.ai/post/how-to-create-engaging-voice-over-for-your-video">How To Create Engaging Voice Over For Your Video</a>‍<br>‍</li></ul><p><strong>About Aflorithmic:</strong></p><p><a href="http://www.aflorithmic.ai/"><em>Aflorithmic</em></a><em> is a London/Barcelona-based technology company. Its </em><a href="https://www.api.audio/"><em>api.audio </em></a><em>platform enables fully automated, scalable audio production by using synthetic media, voice cloning, and audio mastering, to then deliver it on any device, such as websites, mobile apps, or smart speakers.</em></p><p><em>With this Audio-As-A-Service, anybody can create beautiful sounding audio, starting from a simple text to including music and complex audio engineering without any previous experience required.</em></p><p><em>The team consists of highly skilled specialists in machine learning, software development, voice synthesizing, AI research, audio engineering, and product development.</em></p><p>‍</p><p><strong>About VozLab:</strong>‍</p><p><a href="https://vozlab.co.uk/"><em>VozLab</em></a><em> is a technology company based in London, building the next generation of voice-first applications. The companies’ self-serviced platform allows voice experiences to be created, edited and modified on live campaigns, without any coding experience required.</em>‍</p><p><em>The platform enables these voice experiences to evolve with a campaign, which facilitates the conversation between brands and their customers. ‘We understand the best way to get revenue and results through smart speakers,’ concludes Maria Noel Reyes, CEO of VozLab ‘Through our self-serviced technologies, we have developed voice apps focused on longevity and flexibility that will challenge the traditional online mechanics and tactics.’</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af776701e926" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things I’ve learned being a Startup CTO]]></title>
            <link>https://peadarcoyle.medium.com/5-things-ive-learned-being-a-startup-cto-121b000b9738?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/121b000b9738</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Fri, 23 Jul 2021 10:25:33 GMT</pubDate>
            <atom:updated>2021-07-23T14:50:39.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oedi3IdGdfPMrBz2R7iCtw.jpeg" /><figcaption>Photo by <a href="https://www.pexels.com/@thisisengineering?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">ThisIsEngineering</a> from <a href="https://www.pexels.com/photo/photo-of-code-projected-over-woman-3861969/?utm_content=attributionCopyText&amp;utm_medium=referral&amp;utm_source=pexels">Pexels</a></figcaption></figure><p>As a technical founder of a tech startup, I often interact in sales conversations with other CTOs or tech leads. Don’t take the title literally — these tips may also be of interest to tech leads, VPE or other leadership roles at any tech startups.</p><p>This articles aims to simply share what I’ve personally learned. I’d like to start by pointing out that I’m touching 2.5 years into this role and still learning. I’m a first time CTO, and we’re a seed-stage startup with about 20 people.</p><p>Our aim at <a href="http://www.aflorithmic.ai/">Aflorithmic</a> is to:</p><p><strong><em>“Create the authoritative infrastructure for the next generation of audio experiences.”</em></strong></p><p>Our flagship product is <a href="http://www.api.audio/">www.api.audio</a> — a developer-focused product that is beginning to branch out into much more.</p><ul><li><strong>Fundamentally, the CTO role is about business impact</strong></li></ul><p>In my experience as a data scientist, my expertise (somewhat encouraged by the industry — in particular the emphasis on ‘new stuff’ or ‘public relations’) had very little linkages to business impact.</p><p>Firstly, it’s worth clarifying what <em>business impact</em> is. (This is adapted from — <a href="https://dropbox.github.io/dbx-career-framework/what_is_impact.html">https://dropbox.github.io/dbx-career-framework/what_is_impact.html</a>)</p><p><em>For us at </em><a href="http://www.aflorithmic.ai/"><em>Aflorithmic</em></a><em>, we measure the success of our engineers largely on business impact. But what does impact mean? The definition is, by necessity, a bit vague. However, it can best be summed up by one of our core values — “we win when the customer wins”.</em></p><p><em>Impact starts and ends with better serving our customers, which, in turn, helps </em><a href="http://www.aflorithmic.ai/"><em>Aflorithmic</em></a><em> succeed as a business.</em></p><ul><li><em>Adoption and consistent usage of new features</em></li><li><em>keeping a demanding component of our infrastructure going,</em></li><li><em>improving efficiency in our operations</em></li><li><em>reducing operational or capital expenses</em></li><li><em>improving the quality of our voices, and improving the user experience of our API through better error messaging</em></li></ul><p>These <em>are all examples that help both our customers and Aflorithmic win.</em></p><p>Fundamentally the CTO role enables business impact to prosper. That can consist of all sorts of factors — including but not exclusive to — technical delivery, writing code, managing, coaching, architecture, leading technical excellence, bringing in support functions such as dev ops, data scientists, etc. It’s also a role that involves closely working with product, marketing, HR, and many other functions.</p><p>If the market doesn’t care about what you are building or deliver things late, it is your responsibility to respond to consumers’ needs and find a solution.</p><ul><li><strong>Culture matters, and you must take that seriously.</strong></li></ul><p>I’ve already written about culture before — <a href="https://www.aflorithmic.ai/post/friday-wins-celebrating-shipping-and-delivery">https://www.aflorithmic.ai/post/friday-wins-celebrating-shipping-and-delivery</a>. I think, as a developer, it’s easy to roll our eyes when we hear the word “culture”. A lot of what organisations say about culture is usually quite generic and fluffy.</p><p>However, let’s take a step back and think about what culture truly is.</p><p><em>Culture is what you celebrate. Rituals are the tools you use to shape culture.</em></p><p>Now let’s double click on that. If you celebrate ‘starting new projects’, you’ll end up with a culture that rewards that. If you celebrate ‘shipping digital products’ you’ll end up with a culture that rewards that.</p><p>So it is important to be mindful of this. What kind of people do you want in your team? What achievements do you want to reward? What practices do you want to retain?</p><ul><li>Your relationship with your peers across functions matters a lot</li></ul><p>You need to partner very well with your peers across functions — your CEO, cofounder, as you grow, other senior leaders. Sometimes these relationships can be strained, and often it’s because writing complex software with many players is tricky.</p><p>In particular, you need to partner very well with whoever wears the ‘head of product’ hat. Often that’s the CEO, although sometimes it can be another product manager. I’m personally skeptical of a CTO also wearing the head of product hat — it means that one person is juggling a lot of responsibility simultaneously — although I most definitely can appreciate the grind. Startups can initially present a challenge in finding the time to hire all the roles needed, and often, early employees wear many hats until more resources get onboarded.</p><p>It’s very important that the relationship between you and your senior leaders, doesn’t get worn out — if it gets strained, generally, engineering ends up suffering more than product development. It took me many years to understand that, and I think the fundamental reason is — as <a href="https://larahogan.me/blog/advice-for-new-executive">Chad Dickerson ex-CEO of Etsy observed</a> — <em>it’s generally easier to specify high-level product goals and create high-level roadmaps than it is to write complex software.</em> So it’s super important you have a shared roadmap and that you execute according to these timelines.</p><p>One of the biggest lessons I’ve learned in business is that ‘<em>relationships are the most important thing</em>’. You have two jobs : be good at your job and be easy to work with. Some of that is appreciating your communication style, weaknesses, and humans don’t always make rational decisions. Politics; the art of getting the work done in a way that meets everyone’s needs.</p><ul><li><strong>You probably suck as a manager, most first time managers suck.</strong></li></ul><p>It’s a truism: “Management isn’t a promotion. It’s learning a new set of skills”, and there are various things that matter as you manage humans. For example, exercising is a must. Your mood is a foundational quality in leadership that has a domino affects on those around you. Incorporate some exercise into your routine as a healthy stress reliever that increases endorphins, dopamine and adrenaline — brain chemicals associated with feeling happy, confident and capable.</p><ul><li><strong>Always have a story</strong></li></ul><p>It took me a while to get this, but you should always have some sort of ‘story’. For us at Aflorithmic from a technology standpoint it is ‘aflorithmic is a serverless first company’ and that’s really affected how we speak about architecture internally, how we attract talent in the interview process (we’re privileged to have a world class engineering team). It’s natural in engineering jobs to get wrapped up concentrating on the daily work. Nonetheless, it is crucial to have a larger vision or goal to work towards and inspire a sense of purpose.</p><p>And for us as a company — we’re building the ‘<em>simplest way to add audio experiences to your products</em>’ and from that there’s a lot of other things that come out of that. We care about audio — a lot of our engineers have some sort of audio knowledge, or play music. We put creativity at the forefront of our values and we aim to upskill our developers to broaden their experiences (I myself was involved with <a href="https://docs.pymc.io/">open source</a> for a number of years).</p><ul><li><strong>You need to manage yourself — and your emotions</strong></li></ul><p>It’s a common management tip to do exercise. And it’s sound advice, management is a <em>very </em>psychological job and your mood/ demeanour has a huge effect on your team. So there’s a lot to learn about this, and this article isn’t about stress management. I’ve found personally that running works very well for me. However, you need to have something to help you manage the ups and downs of startups, people and your own mentality.</p><p>Also you’re doing a disservice to your team if you don’t do this. So take a walk, swim, run or whatever. Your team will thank you for it!</p><p><strong>Recommended reading</strong></p><p>There’s many great management and technical management blogs and books out there. I hope this helps</p><ul><li><a href="https://larahogan.me/blog/advice-for-new-executive">https://larahogan.me/blog/advice-for-new-executive</a></li><li><a href="https://kellanem.com/notes/advice-for-a-new-manager">https://kellanem.com/notes/advice-for-a-new-manager</a></li><li><a href="https://www.oreilly.com/library/view/the-managers-path/9781491973882/">https://www.oreilly.com/library/view/the-managers-path/9781491973882/</a></li><li><a href="https://kellanem.com/notes/surviving-being-senior-tech-management">https://kellanem.com/notes/surviving-being-senior-tech-management</a></li></ul><p><strong>Happy to chat audio or being a CTO!</strong></p><p>If you have any questions about <a href="http://www.api.audio/">www.api.audio</a> feel free to drop me a line at peadar[at]aflorithmic.ai I’m happy to chat about anything CTO related (although my time is limited I do try to respond or write blog articles related to these topics).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=121b000b9738" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to programmatically add audio to a youtube video]]></title>
            <link>https://peadarcoyle.medium.com/how-to-programmatically-add-audio-to-a-youtube-video-ae178c0049ed?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae178c0049ed</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[audio-engineering]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Fri, 28 May 2021 10:02:04 GMT</pubDate>
            <atom:updated>2021-05-28T10:02:04.348Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*lXNAXB7RHvS7Wl5db_I67w.jpeg" /></figure><p>Our mission is to create frictionless audio experiences through coding. Video is a very important part — since video is often connected to audio.</p><p>Video creation itself is already widely accessible: There are stock videos you can use to create your content and there are audio libraries with royalty-free music, many of them free. You can even use text-to-speech voice-overs if you don’t want to narrate the content yourself.</p><p>Now, with api.audio, you can do all of that programmatically through our api. Not only is it faster and, as you will see, a lot easier, it also gives you the opportunity to integrate that functionality into your personal workflows.</p><p>Today I will show you how to create a new voice-over and background music for a Youtube video. The final product is a new version of your existing video. You can create as many of these as you want, using our script parameters to automatically create thousands of versions.</p><p>But let’s start with something simple. Feel free to explore the api.audio documentation and build your own, more complex version.</p><p>Let’s consider a real world project or use case: Imagine you’re a real estate agency and you want to sell a property in London with a video walkthrough you’ve made, and you want to make that personalized to 30 potential buyers. That way, you can highlight the features you know will be important to each potential buyer and you can address each of them by name. That’s just one of the many possibilities to use this feature; you can go all in, automating and integrating it to your system if you want.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7szDRquCGps&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7szDRquCGps&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2F7szDRquCGps%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f134e191166eb4d3db55f57ab03a8a4c/href">https://medium.com/media/f134e191166eb4d3db55f57ab03a8a4c/href</a></iframe><h3>Before you start: Get your api key</h3><p>It all starts with that. Here is how to do it: <a href="https://docs.api.audio/recipes/sign-up-here">https://docs.api.audio/recipes/sign-up-here</a></p><h3>1. Import packages</h3><p>For Python, install FFmpeg with</p><p><em>sudo apt install ffmpeg or brew install ffmpeg.</em> Then, <em>pip install -U pytube aflr</em></p><p>For JavaScript:</p><p><em>npm install ytdl-core fluent-ffmpeg </em>or</p><p><em>yarn add ytdl-core fluent-ffmpeg</em></p><p>Note: Don’t use yarn and npm. Pick one :)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2763a39c29b4235f7abdcafe6ced154/href">https://medium.com/media/b2763a39c29b4235f7abdcafe6ced154/href</a></iframe><h3>2. Create your speech with API.audio</h3><p>Let’s create some speech!</p><p>Remember to import your API key. If you haven’t done so already, you can get one here: <a href="https://console.api.audio/register">https://console.api.audio/register</a></p><p>Now, choose a speaker and adjust the speed of the voice.</p><h3>3. Download a video from YouTube</h3><p>Let’s download a video from Youtube!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/98eda5df5b2fb6462b7de22a0489fc3e/href">https://medium.com/media/98eda5df5b2fb6462b7de22a0489fc3e/href</a></iframe><h3>4. Set up your video with speech</h3><p>Combine the audio with your video!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16dcb22eadc13122bda436753d6306c4/href">https://medium.com/media/16dcb22eadc13122bda436753d6306c4/href</a></iframe><h3>5. Create your video with a voice over</h3><p>Create a script for your voice over.</p><p>Paste in the url of the YouTube video you want to create a voice over for!</p><p>Check your local folder for your mp4 file!</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b00d137aedf4910c5a473d70aa62e84/href">https://medium.com/media/5b00d137aedf4910c5a473d70aa62e84/href</a></iframe><p>That’s it! I hope you’ll like this feature and give it a go yourself. Any feedback is always appreciated of course.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae178c0049ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to share audio messages on Slack]]></title>
            <link>https://peadarcoyle.medium.com/how-to-share-audio-messages-on-slack-f16072c32b4b?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/f16072c32b4b</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[audio-engineering]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Thu, 13 May 2021 09:59:15 GMT</pubDate>
            <atom:updated>2021-05-13T11:08:20.731Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dgj7emhYBvjri07YgWsi-A.jpeg" /></figure><p><em>Before we start I just wanted to give full disclosure that I’m a Co-Founder of </em><a href="http://www.aflorithmic.ai/"><em>Aflorithmic</em></a><em>, so expect some bias towards what we’re building. Not only is it my job, audio tech is my passion.</em></p><p>Aflorithmic makes scalable audio, something that has never been possible before, due to the fact that voice content has to be recorded. Our main product api.audio provides the infrastructure to do that. You can use Text to speech for creating voice content, add a sound design, master the track and do all of that automatically for thousands of versions. Job done? Well, there’s more. As an infrastructure there should also be connectivity with other services and apps.</p><p>So we built an integration for Slack. There are many of them, so why does it matter? The reason why I think this is important is because it’s a connector to our infrastructure. You can create your audio tracks on api.audio and share them into Slack. We’re building a lot of these connectors so you’ll hear me talking about those a lot more in the future.</p><p>But let me show you how it works. Or as I like to term it — ‘show me the code’.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fzun0tMTydn0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dzun0tMTydn0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fzun0tMTydn0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1894ee6068931e6a1eba0895fb7bb401/href">https://medium.com/media/1894ee6068931e6a1eba0895fb7bb401/href</a></iframe><p><strong>1. Create your Slack account</strong></p><p>Go to <a href="https://slack.com/intl/en-es/help">https://slack.com/intl/en-es/help</a> and click on Sign up</p><p>(👍 Already have a Slack account? You’re all set! Move on to step 2)</p><p><strong>2. Create your Slack app and set it up</strong></p><p>1️⃣ Log into your Slack account, and select select the Slack Workspace to send messages to</p><p>2️⃣ Go to <a href="https://api.slack.com/">https://api.slack.com/</a> and click on Create a custom app</p><p>3️⃣ Choose a name and a Development Slack Workspace and click on Create App</p><p>4️⃣ On the left menu click on OAuth &amp; Permissions and under “Bot Token Scopes” select Add an OAuth Scope. Select “files:write”, “groups:write” and “chat:write”.</p><p>5️⃣ Scroll up and click on Install to Workspace and Allow. Copy the Bot User OAuth Token.</p><p>6️⃣ Now, in Slack Workspace, find the group you want to send the audio message to and copy&amp;paste: /invite @your_App_name.</p><p>Now we can start coding!</p><p><strong>3. Create your audio file with the API.audio</strong></p><p>1️⃣ Obtain and import your API key</p><p>2️⃣ Create and download a voice clip from text with API.audio</p><p>(👍 Customise your script text and choose your favourite speaker and background track!)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/031edd99d6b1ff1267bc482ce93c3166/href">https://medium.com/media/031edd99d6b1ff1267bc482ce93c3166/href</a></iframe><p><strong>4. Send a message to the Slack channel with a file attached!</strong></p><p>📘 The following sample code is given by the Slack API documentation. More information: <a href="https://api.slack.com/methods/files.upload/code">https://api.slack.com/methods/files.upload/code</a></p><p>1️⃣ Paste in the Bot User OAuth Token.</p><p>2️⃣ Choose your target channel. (At the channel variable, it is possible to write the name of the channel or its id. More information about how to find the id here: <a href="https://www.wikihow.com/Find-a-Channel-ID-on-Slack-on-PC-or-Mac)">https://www.wikihow.com/Find-a-Channel-ID-on-Slack-on-PC-or-Mac)</a></p><h3>Script to send files</h3><p>Documentation: <a href="https://api.slack.com/methods/files.upload/code">https://api.slack.com/methods/files.upload/code</a></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a5086ed5ef3d9a08bdc3e198c2e08d79/href">https://medium.com/media/a5086ed5ef3d9a08bdc3e198c2e08d79/href</a></iframe><p>And that’s it!</p><p>So what is this good for? The most obvious reason I had in my mind was sending my part of the daily standup as an audio file to Slack so I can keep coding! Other people in the organisation like to send pranks using a Darth Vader filter with one of the Text To Speech voices in our library. My favourite one used a Russian voice but typed the content in English, resulting in what I think of a heavy Vladivostok accent (I’ve never been in Russia though).</p><p>I’m passionate about developer tools. And one of the key things about developer tools is that they unleash human creativity! I’m sure there are use cases that are much more advanced than what I wrote and actually useful to your business. However, I’m also a big fan of playing around with tech and seeing what comes out of it.</p><p>If you want to have a closer look at the slack connector try this: <a href="https://docs.api.audio/docs/create-an-audio-message-and-share-it-on-slack">https://docs.api.audio/docs/create-an-audio-message-and-share-it-on-slack</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f16072c32b4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why hasn’t the Tech ecosystem worked in Luxembourg?]]></title>
            <link>https://peadarcoyle.medium.com/what-hasnt-the-tech-ecosystem-worked-in-luxembourg-226ee4078f49?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/226ee4078f49</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[ecosystem-building]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Sun, 21 Jun 2020 10:41:13 GMT</pubDate>
            <atom:updated>2020-06-22T07:44:00.582Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ouNTnvfGLPBJScfB" /></figure><p>The screenshot above is specifically about Luxembourg, however I think this will be of interest to other ‘startup hubs’ and policy folks, entrepreneurs and those who are interested in the question of how to foster an innovative ecosystem.</p><p>I’m an Irish entrepreneur — with a company that has offices in London and Barcelona, I did my masters in Luxembourg, and spent a few years working in its ‘tech sector’. I strongly felt the tech sector was nascent about 5 years ago, and while I regularly visit it and talk to people in its ecosystem, I haven’t seen ‘growth’ or success stories. I think this question is very interesting and while I’m not a policy expert I’ll present some of my own suggestions for improvement.</p><p>When I first encountered tech in Luxembourg, I was told that ‘in 5 years this country will be a meaningful tech ecosystem’ — it’s been more than 5 years. It’s worth evaluating what’s worked and what hasn’t.</p><p><strong>Firstly, we should always start with the positive.</strong></p><p>Luxembourg has a number of government-backed programs. Most notably — <a href="https://www.startupluxembourg.com/fit-4-start">fit4start</a>. This has supported a number of startups and seems to attract startups from all over the world. It has supported over 70 companies, so this is a good contribution to the European ecosystem. I participated in it last year and one of my confusions was that it wasn’t clear whether it was aimed at pre-seed or at later stage companies. It’s an unfair comparison, in my opinion, to compare revenue-generative later stage companies with higher risk early-stage companies.</p><p>Luxembourg has some tech startups — Talkwalker, JobToday and more established companies like Amazon have at least some product managers and software engineers. I ran the ‘<a href="https://www.meetup.com/LuxRgroup/">data science Luxembourg</a>’ event for a number of years, such moves are great, they support the ecosystem. And there have been various organisations that have been supportive. However, compared to other ecosystems that I’ve been in, it’s not been as fast-growing.</p><p>Financial awareness: Luxembourg is one of the leading financial centers in the world. While such knowledge is great, it doesn’t necessarily transfer to startups. Startups are very different organisations to mutual funds or family offices. Nevertheless, having financial analysts in the city can be helpful for understanding how to run a company well.</p><p>There’s a lot of coworking spaces and incubators. While some of these are bureaucratic, offering a community and access to mentors can be helpful.</p><p><strong>What room for improvement is there?</strong></p><p><em>A ready supply of VC/angels.</em></p><p>While there are a <a href="https://www.exponcapital.com/">few funds active</a> in Luxembourg and the surrounding region not to mention the famous <a href="http://www.mangrove.vc/">Mangrove</a> (which is largely a pan-european and Israeli focused fund from looking at its investments). And there is the <a href="https://www.lban.lu/">Luxembourg Business Angels Network</a> however, compared to other ecosystems like London, Dublin, Berlin, or Barcelona there’s a lot of room for improvement.</p><p>Luxembourg hasn’t had many ‘exits’ as far as I’m aware, so without that, it’s hard to bootstrap an angel network. <em>Mentors are great but cash helps a lot.</em></p><p><strong>Suggestion </strong>— tax incentives such as the <a href="https://www.seis.co.uk/">SEIS scheme</a> in the UK, can work well for de-risking startup investment. My own company raised capital from such a scheme and I know from talking to investors that the tax incentives were helpful.</p><p><em>Experienced scale-up professionals</em></p><p>While the situation is improving, here’s a question: who do you hire if you’ve hit over 1 million ARR (annual recurring revenue)? where are the local scale-up professionals? The answer is that you have to import people from overseas. Whereas in London or Barcelona you can often find people locally due to the number of exits or large offices. Success breeds success. Without a steady stream of companies launching, winning, exiting and booming, there is no healthy pipeline of talent or available capital to build the next generation of breakout companies.</p><p><strong>Suggestion</strong> — this is a hard one. I’m actually not sure what can be done policy-wise to fix this.</p><p><em>A community of established success stories</em></p><p>I did some research and I could only find one Unicorn (a billion dollar plus valuation company) — <a href="https://www.eu-startups.com/2019/07/luxembourg-based-ocsial-a-manufacturer-of-graphene-nanotubes-has-joined-europes-growing-list-of-unicorns/">https://www.eu-startups.com/2019/07/luxembourg-based-ocsial-a-manufacturer-of-graphene-nanotubes-has-joined-europes-growing-list-of-unicorns/</a> I struggled to find other success stories, with the exception of <a href="https://www.talkwalker.com/">Talkwalker</a> — which seems to have had a partial exit. This is sobering for any venture capitalists in the area, and sobering for those looking to set up companies here. For full disclosure, it’s worth noting where I set up my own company.</p><p><em>Entrepreneurial mindset</em></p><p>Someone remarked to me once over a coffee that ‘Luxembourg is a conservative country even its motto — Mir wëlle bleiwe wat mir sinn is conservative’ — It translates roughly as <em>We want to stay what we are. </em>Hilarious anecdote aside, it’s worth remarking that when you speak to the Luxembourgish and those who’ve been here for a while — putting this delicately — they aren’t the most entrepreneurial or risk-taking people. Their concerns are more about affording their next BMW and why would one work for a high-risk startup when one could work for the state.</p><p>Cultural stuff like this is very hard to change. So I’m not sure what to suggest either.</p><p><strong>What does it mean for the next decade in Luxembourg?</strong></p><p>I wish I had an optimistic message. My message to founders/entrepreneurs here is to get on a plane and go elsewhere — London, Berlin, Barcelona. If you want to set up a company here, <strong>I’m afraid the ecosystem is actively working against you</strong>. It IS possible to create a unicorn in Luxembourg, but it’s much harder.</p><p><strong>Is this a fair comparison?</strong></p><p>Some friends noted that comparing a country of 600k people to bigger countries is not an apples to apples comparison. There’s a lot of talk of a ‘grand region’ in Luxembourg which is the surrounding areas of Belgium, France and Germany — however such notions are kind of a ‘fairytale’. Let’s make some comparisons then to ‘smaller and lower tier’ tech cities in Europe.</p><p>Krakow, Poland and Talinn, Estonia. Both cities have a population of around the population of the country of Luxembourg.</p><p><strong>Talinn, Estonia</strong></p><p>Estonia has been a very tech-focused country for a number of years, this is partly a function of it’s geography, partly a function of the technical education of former Communist Eastern Europe and of course Skype was founded there in 2003, leaving a lasting legacy.</p><p>There are estimated to be 400 startups in Estonia, and about 70% are estimated to have some sort of connection to Skype. In fact Transferwise (an ‘Estonian’ success story located in London has ex-Skype founders).</p><p>Estonia has it’s problems though, while it has some great local technical talent. There’s a scarcity of early-stage capital (like in Luxembourg), and a scarcity of marketing talent and business-focused skills on the ground and so companies often need to set up satellite offices for this.</p><p>The e-residency program and the startup visa from Estonia are some things that are worth looking at for policy advisors.</p><p>Startups to watch from Estonia include — Pipedrive and Bolt.</p><p><strong>Krakow, Poland</strong></p><p>Poland, in general, has some great technical universities and it is home to development hubs for major international firms such as IBM, UBS, Epam Systems, and the French outsourcing firm Capgemini, Kraków is awash in tech talent, and entrepreneurs enjoy relationships with these more established companies.</p><p>One of the advantages is that labor costs are lower in Krakow, which like cities like Lisbon attracts companies.</p><p>Poland has some government support as well to support startups. It’s got some early success stories — the largest that I saw was <a href="https://brainly.com/">Brainly</a> which is a ‘quora for students’. It also has the ecosystem — <a href="https://www.omgkrk.com/">https://www.omgkrk.com/</a></p><p>Luxembourg should look at cities like Krakow and Talinn to see what they can learn.</p><p><strong>Conclusion</strong></p><p>My message to the government — evaluate your tax incentives. Make it easier for companies to fundraise.</p><p>My message to investors — don’t just drip feed capital to companies here. Accept that if you want upside, you’ll need to put in sufficient capital.</p><p>If you’re a founder in Luxembourg and you want some advice/ introductions ping me I’m peadarcoyle[at]gmail.com always happy to talk to members of the founders club.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=226ee4078f49" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons learned building multiple apps with Expo and React Native]]></title>
            <link>https://levelup.gitconnected.com/lessons-learned-building-multiple-apps-with-expo-and-react-native-28bd43b72b84?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/28bd43b72b84</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Fri, 15 May 2020 19:19:26 GMT</pubDate>
            <atom:updated>2020-05-19T02:43:11.105Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2OxL24JTbhcKaLSCkHpaKg.png" /><figcaption>One of the apps built with our App creation technology— <a href="https://nutridi.app.audio/">Nutridi</a></figcaption></figure><p>by <a href="http://www.peadarcoyle.com/">Peadar Coyle</a> and <a href="https://www.linkedin.com/in/salihkasimbenli/">Salih Kasım Benli</a></p><p>We used <a href="http://www.expo.io/">Expo</a> <strong>managed flow</strong> for a year. Here are some things we’ve learned over the past 18 months with a small developer team.</p><p>Aflorithmic Labs (<a href="http://www.aflorithmic.ai/">www.aflorithmic.ai</a>) is a deep-tech focused startup that’s building a platform for brands to create personalized audio experiences. Our clients and users often look for apps as a delivery mechanism so we’ve built some <strong>tooling to make it easy to create apps</strong>, connecting to our APIs in the backend.</p><p>When we were starting our journey about 18 months ago, our founder Peadar evaluated React-Native, native code, and flutter.</p><p>Our core philosophy when building apps is that we look to abstract what we can to our backend APIs and we look to streamline the app generation process as much as possible.</p><h3>Our mobile app tech stack</h3><ul><li><a href="https://www.typescriptlang.org/">Typescript</a></li><li><a href="https://reactnative.dev/">React Native</a> with <a href="http://www.expo.io/">Expo</a>*</li><li><a href="https://reactnavigation.org/">react-navigation</a></li><li><a href="https://redux.js.org/">Redux</a></li><li><a href="https://docs.amplify.aws/">Amplify</a></li></ul><p>*<em>We’ve benefited from all the work the amazing Expo team has done on the ecosystem, but since we started over a year ago (notably, before Expo launched </em><a href="https://dev.to/evanbacon/getting-started-with-expo-web-168g"><em>web support</em></a><em>) and because we have a number of native components — in particular audio-focused, we’re on what’s essentially the </em><a href="https://docs.expo.io/versions/latest/introduction/managed-vs-bare/#workflow-comparison"><em>Bare workflow</em></a><em>.</em></p><p><strong>History</strong></p><p>We picked React-Native because it felt the most well-established community at the time, and we wanted the advantage of one shared code base across both iOS and Android. In particular, we picked <a href="http://www.expo.io/">Expo</a> an SDK on top of react-native which made the development process even more seamless. We eventually ejected from Expo to the bare workflow. However the first 1 year of our development, of apps such as <a href="http://www.withhislight.app/">www.withhislight.app</a> (an app built using our personalized audio API)</p><p><strong>Philosophy</strong></p><p>All applications should have a philosophy behind them.</p><p>For us, we had a few guiding principles in terms of user experience and the tooling we picked.</p><ul><li>Should work on both platforms (Android and iOS)</li><li>We should try to keep as much code overlapping as possible — although we do have some platform-specific code in the codebase.</li><li>If we can buy in a third party service we should — hence we picked AWS Amplify for our authentication and earlier analytics, and other tooling such as AWS Lambdas.</li><li>We tried to keep the front-end as agnostic as possible, so where possible we put stuff into our APIs. This informed a lot of our code decisions.</li><li>We wanted a world-class UX. And our software engineers spent a lot of time streamlining our UX experience. We’re still not where we want to be but we’re pretty proud of our experience.</li><li>Velocity, since we were still trying to figure out product-market fit we wanted to make deployment of new features as smooth as possible.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQBihfWvjcEEB0FC9nbCxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nTgS0Vkceqk-olv8lh0qoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMIAYYCOOE4nZbr5CfAL6A.png" /><figcaption>Some screenshots of one of our apps on the IPad. Expo made it easy to be cross-platform.</figcaption></figure><p>React-native also allows you to share some knowledge with React.js so while there are differences between web and mobile apps, often it’s quite easy for someone with a rudimentary knowledge of react.js to pick up native. To pick up Java and Objective C is much harder.</p><p>In fact, one of our founders still doesn’t know much javascript and he was able to code the MVP from scratch. He came from a python background, so if he can build an app any developer can!</p><p>Let’s delve into some of the trade-offs about Expo and React Native components. These are audio player focused, but even if your app is a different app, you may get something out of this.</p><p><strong>Expo Audio Player</strong></p><p>Expo AV, expo’s audio and video player, is designed to just work. You can spin up an audio or video app in less than 2 weeks. Since it’s built by the Expo team, it’s built to be easy-to-use and opinionated. Opinionated means that there’s only one way to do certain things (so the API is somewhat restrictive), so this accelerates product development. However, opinionated also means that eventually, we reached some problems with it. The Expo team is fast at developing, so sometimes we could wait for an SDK upgrade — for example at one point it didn’t allow playing audio in the background, this was resolved in an SDK upgrade.</p><p>What are some of the disadvantages — it does not <em>feel</em> native. It does not have lock screen and notifications controls, does not have a stable background mode, stops when changing tracks on iOS. Despite this, for an MVP it works pretty well.</p><p>We noticed that when we moved to “react-native-track-player” is that it is not working app-wide. This means that it stops when the component having it unmounts, it also has some problems with global state, increasing the music-related screen’s codebase due to the fact that we have to foster that sound related logic there. Since all of the logic is built around a “playbackObject”, it is impossible to reach audio related data outside that component. After using “<a href="https://github.com/react-native-kit/react-native-track-player">react-native-track-player”</a>, we implemented a “useTrackPlayer” custom hook that can be used anywhere in the app to obtain percentage, duration left, state and more.</p><p>Expo AV is designed to just “work” as mentioned before, so if one wants to have a sound-centered app, like a podcast or radio app, it will not meet the requirements after a certain point. However, it is versatile, Expo AV also supports playing videos. Hence, for an MVP, it is recommended to go with it. However, to get an improved UX like Spotify, native modules are better. The learning for this is that to go fast, you need to give up some control. This is the power of frameworks.</p><p><strong>Push Notifications</strong></p><p>Push notifications are another topic Expo helps a lot when creating an MVP. It is easy to use and test, dealing with certificates and credentials is left to Expo servers and with a simple backend, it may just work.</p><p>Even though this is really helpful at the very beginning of the development, as the product evolves to something there will be a need to use a more complicated and powerful service. <a href="https://onesignal.com/">OneSignal</a>, react-native-push-notification and wix/react-native-notifications are examples of those services/packages. Additionally, if Expo’s notification servers are used, any other tool can not be used. For example, you can not combine Expo’s way of handling push notifications with MixPanel. Expo team is making a great job on documentation and supporting the community, there are a lot of examples to design a backend talking to Expo’s servers to send notifications, see <a href="https://docs.expo.io/guides/push-notifications/#2-call-expos-push-api-with-the">https://docs.expo.io/guides/push-notifications/#2-call-expos-push-api-with-the</a> for further details.</p><p><strong>Using native modules</strong></p><p>While developing a react native app, it may be needed to use native modules. A native module can be briefly explained as a package that uses native code to accomplish some sort of tasks and communicates with react native. They are usually written in Java, Obj-C or Swift. If Expo is used, no native packages can be used (except the ones Expo team has already made available) So, this is why “react-native-track-player”, “react-native-iap” or “react-native-wheel-picker-android“ and many other great packages can not be used with Expo. However, Expo team always tries to come up with a solution to common issues, e.g <a href="https://docs.expo.io/versions/latest/sdk/in-app-purchases/">https://docs.expo.io/versions/latest/sdk/in-app-purchases/</a></p><p><strong>Expo CLI — </strong><a href="https://github.com/expo/expo-cli"><strong>https://github.com/expo/expo-cli</strong></a></p><p>I have been using expo-cli for 2 years as of today. It has changed so much and got better. “expo install” or “expo upgrade” are examples of this solid improvement. In addition, this awesome cli is really useful to automate releases and tests. A CI/CD system can be built easily and fast by using expo-cli.</p><p><strong>Bare Workflow</strong></p><p>Expo gives developers an option to eject. Ejecting means going to “bare workflow” from “managed workflow”. More details can be found on their website. As aflorithmic Labs, we eventually picked this option after 1 year of development, in particular, there were some native-modules we wanted to use. Ejecting isn’t free. So it’s worth pointing this out. After ejecting there were some problems encountered:</p><ul><li>CI/CD setup needs to be renewed — in particular we lost one week to gradle build errors</li><li>Managing certificates/credentials gets harder</li><li>Native module setup can be harder than just running “expo install”</li><li>The configuration is a lot harder. Instead of just changing app.json, a lot of native directories and files should be edited.</li></ul><p><strong>Final thoughts</strong></p><p>Expo is a really great package, developed by a great team and one of the best communities. All of the react-native projects that can be tested without touching a device if written on <a href="https://snack.expo.io/">Snack</a>, which is also developed by the <a href="http://www.expo.io/">Expo</a> team. However, as everywhere in life, it has some shortcomings, which we mentioned above.</p><p>If one is a new startup, trying to convince a customer or decided to create a new product about some new topic, then he should use Expo by default (if there is no <a href="https://docs.expo.io/introduction/why-not-expo/">limitation</a> known). We (Aflorithmic Labs), used Expo for 1 year to have an audio app in production and available on App Store and Play Store.</p><p><strong>Thus, one should not think of Expo as a package to just start. There might really be no reason not to use it.</strong></p><p>In any side projects we build, we immediately turn to Expo and existing toolkits such as Firebase and Amplify. This significantly reduces the time to build and deploy an app, and while we were skeptical at first. We were amazed by how far we got with Expo alone. Thanks for all the great work to the Expo team.</p><p>If you want to try out some apps built with our platform you can look at <a href="http://www.withhislight.app/">WithHisLight</a> which is available on <a href="https://apps.apple.com/us/app/with-his-light/id1460383692?ls=1">iPhone</a> and on <a href="https://play.google.com/store/apps/details?id=com.aflorithmic.withhislight4">Google Play</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28bd43b72b84" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/lessons-learned-building-multiple-apps-with-expo-and-react-native-28bd43b72b84">Lessons learned building multiple apps with Expo and React Native</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 reasons why I’m excited about Audio]]></title>
            <link>https://peadarcoyle.medium.com/5-reasons-why-im-excited-about-audio-33553eca6ce3?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/33553eca6ce3</guid>
            <category><![CDATA[airpods]]></category>
            <category><![CDATA[audio]]></category>
            <category><![CDATA[podcast]]></category>
            <category><![CDATA[voices]]></category>
            <category><![CDATA[audio-first]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Sat, 07 Dec 2019 17:34:21 GMT</pubDate>
            <atom:updated>2019-12-07T17:44:31.207Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>(Disclaimer: Working on something exciting and new in the audio/voice space, but we’re still in stealth mode — you can DM me on the internets to find out more)</em></h4><p>I was recently listening to the podcast mentioned <a href="https://techcrunch.com/2019/01/05/marc-andreessen-audio-will-be-titanically-important-and-vr-will-be-1000-times-bigger-than-ar/">here</a> this is where Marc Andressen the legendary investor and thinker about technology said:</p><blockquote>Audio is going to be titanically important — Marc Andressen</blockquote><p>Now it’s worth digging deep into why that’s the case. Here are 5 reasons I’m excited about audio/voice tech. And why I think we’ve only scratched the surface of what can be built in that space.</p><ol><li><strong>Airpods</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Jw4Wur-9_2-Yd-hvuYeAQ.png" /></figure><p>This chart <a href="https://pappageorge.substack.com/">from</a> Nick Pappageorge shows one estimate from Loup ventures, although other estimates are lower. However, anecdotally I counted my overground carriage into work last week and I saw about 25% of people wearing airpods or airpods pro. I also saw a lot of other people wearing other sorts of headphone hardware. Now I do work in Shoreditch, London. So my exposure might be not representative.</p><p>Nevertheless, when I speak to people wearing them</p><ul><li>They wear them all the time <em>(habits)</em></li><li>They feel comfortable wearing them even when having a conversation <em>(social convention changing)</em></li><li>They wear them to feel less alone. <em>(deep human desire)</em></li></ul><p>So we’ve got devices that are at potentially 100 million unit sales (that’s significantly more than VR headsets — the last estimate I saw was 20 million unit sales) and they’ve hit the sort of market penetration that the iPhone had in 2012.</p><p>I think this will lead to things like <em>immersive audio experiences, </em>and new kinds of<em> social audio</em></p><p><strong>2. Rise of voice-first interfaces such as smart speakers</strong></p><p>It’s worth taking a step back from audio and thinking about what it actually enables. What is driving this audio consumption?</p><p>The <a href="https://www.intercom.com/resources/books/intercom-jobs-to-be-done">job to be done</a> is something like ‘I want to be entertained or informed but I can’t look at a screen’.</p><p>This is driven by whether you’re driving, doing the washing at home, commuting, whatever. Or on your feet at work.</p><p>So how do we interact with audio? Well, a very natural interface is using <em>voice </em>and these interfaces are already mainstream — Alexa is a mainstream word.</p><p>We’re already seeing the rise of these, and I imagine we’ll see even more such interfaces and the human acceptance to use them at say work environments.</p><p><strong>3. Podcasts are going mainstream</strong></p><p>This one doesn’t need much explanation but podcasts are booming and a fast-growing industry. See the acquisitions of Gimlet and Anchor by Spotify.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjEBhey__t3x12de2rf7ng.png" /><figcaption><a href="https://a16z.com/2019/05/23/podcast-ecosystem-investing-2019/">A16z analysis of the podcast ecosystem</a></figcaption></figure><p>Podcasts are growing at breakneck speed, and it’s staggering that 65% of active listeners only started listening in the last three years.</p><p>So we’re seeing strong secular tailwinds in podcasts, and the rise of other forms of audio entertainment. There’s a huge demand for picks and shovels in that space.</p><p><strong>4. Social networks on audio will happen — but what will it look like?</strong></p><p>This is the one I’m most fuzzy on but imagine like a WhatsApp for voice/audio. Where you’re in some sort of social network for audio. The closest example I can see is <a href="https://www.ttyl.fyi/">TTYL</a> seems to be working on snapchat for voice messages.</p><p>Worth a read — As written by Jordan Cooper <a href="https://jordancooper.blog/2018/08/29/airpods-as-the-next-platform-and-the-native-applications-therein/">in an excellent post</a>: Fortnite &amp; airpods have unlocked a new form of presence.</p><p>I’ll explore this one more in the future. However, it’s such an intriguing idea I wanted to mention it.</p><p><strong>5. Audio in the workplace</strong></p><p>Some of my friends who are salespeople have already remarked that their sales team wear airpods all day long, this makes sense — you’re either calling someone or you’re listening to audio all day long. It doesn’t make sense to take them out of your ears. This point was also made <a href="https://npappag.com/2019/05/22/why-im-closely-watching-listening-to-audio-airpods/">in</a>.</p><p>Audio especially when accelerated — I listen to podcasts at high speed — allows higher throughput learning. And we’re already seeing experimentation in this area such as <a href="https://www.whispr.ai/">Whispr</a> which is building tools for the education/training of frontline workers such as hospitality workers.</p><p><strong>Call to action</strong></p><p>I’m working on some exciting tooling in this space. If you’re a brand, influencer or podcast host with say interest in new audio creation tooling, I’d love to talk to you :)</p><p><a href="https://twitter.com/Springcoil">https://twitter.com/Springcoil</a> is my Twitter</p><p>Or I’m firstnamelastname[at]gmail.com</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33553eca6ce3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to build a Bayesian model in 30 minutes or less]]></title>
            <link>https://medium.com/data-science/how-to-build-a-bayesian-model-in-30-minutes-or-less-fd7a23ca1ecf?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd7a23ca1ecf</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Mon, 19 Nov 2018 01:00:12 GMT</pubDate>
            <atom:updated>2018-11-21T23:28:04.882Z</atom:updated>
            <content:encoded><![CDATA[<h3>You have a problem that you think might need some Bayesian modelling</h3><p>A common question I’m asked is <strong>how do you start</strong>?</p><p>In this tutorial I take you from a fresh data set, the data set is an educational dataset. I don’t know anything about the data, and I have no specific domain knowledge. I adapt the model from the <a href="https://docs.pymc.io/notebooks/hierarchical_partial_pooling.html">PyMC3 documentation</a>.</p><p>I then evaluate the model using tools such as <a href="https://arviz-devs.github.io/arviz/">Arviz</a>, to explain and evaluate your modelling decisions. I use this to inform a better model and we see from our evaluation of the model that the second model is much better. You can view the Binder link here on <a href="https://github.com/springcoil/modernbayesianworkflow">Github</a> — in the census_data notebook.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*29Geyhyn_b4MGOrn.png" /></figure><p>Our first step is to build a model. We describe it in the screenshot above.</p><p>[gallery ids=”2034,2033,2032&quot; type=”rectangular”]</p><p>We do the visualisation stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ond2RO7dx85stuUG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pXzEnSonZXX6C6PU.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d81CwvwJgwc2KvFI.png" /></figure><p>We see our first model is poor, look at the plot_ppc plot our model isn&#39;t fitting the observed data at all. This is poor.</p><h3>How can we improve the model?</h3><p>Well we can use our knowledge from the modelling process to realise that Beta distribution is a poor distribution and too tight, we can also see that the various model metrics are poor. (This is all in the notebooks). So let’s change from the Beta distribution to the Gamma distribution and see what happens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IdVN-cJttuEVfPd7.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kMQYyr9A8B1nd6SU.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_vApXIgztPOAV6mG.png" /></figure><p>We see the second model is much better. See how the red posterior predictive plot fits the black observed data much better. This is a much better model.</p><h3>What’s the key takeaways?</h3><p>It’s a good idea to start with a model from an example, and then see how that performs in your modelling use case. It’s the refining and criticising your model that’s the key part. You can see in the above how I use tools like <a href="https://docs.pymc.io/notebooks/posterior_predictive.html">Sample Posterior Predictive</a> to criticise and improve the model.</p><p>It’s good to internalise this image — the Box loop, that’s the workflow you need in building Bayesian models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/0*k1g-sYQ0QTOtOAyK.png" /></figure><p>The key thing is that you incorporate into the model what you learn about the domain you’re trying to model. You see this above when I move from a Beta distribution to a Gamma distribution. This is different to some Machine Learning workflows you may be used to.</p><h3>Want to learn more?</h3><p>If that wet your appetite and you may want to learn more. You can sign up for a free 5 day email course on Bayesian Stats <a href="http://learnprobprogramming.me/">here</a>, or if you’re convinced already you can purchase the full course on <a href="http://www.probabilisticprogrammingprimer.com/">Probabilistic Programming Primer</a>. In my course I give nearly 4 hours of screencasts to explain the concepts of Bayesian Modelling. I cover examples such as ‘Are Self Driving cars safe’, I give intros to a range of new probabilistic programming tools, and I also give exclusive screencasts on <a href="https://arviz-devs.github.io/arviz/">Arviz</a>. If you can follow this blog post and understand it, then this course is for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd7a23ca1ecf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-to-build-a-bayesian-model-in-30-minutes-or-less-fd7a23ca1ecf">How to build a Bayesian model in 30 minutes or less</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Bayesian Statistics used for?]]></title>
            <link>https://medium.com/data-science/what-is-bayesian-statistics-used-for-37b91c2c257c?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/37b91c2c257c</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Thu, 01 Nov 2018 14:32:05 GMT</pubDate>
            <atom:updated>2018-11-06T13:42:56.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Probabilistic Programming versus Machine Learning</h3><p>In the past ten years, we’ve seen an explosion in Machine Learning applications, these applications have been particularly successful in search, e-commerce, advertising, social media and other verticals. These applications have been particularly focused on predictive accuracy and often involve large amounts of data — sometimes in the region of terabytes — in fact this drove a lot of innovation at the Tech giants such as Netflix, Amazon, Facebook and Google.</p><p>Fundamentally though these models often are ‘black boxes’ and are not easily understood by observers, in applications such as churn modelling or building targeted advertising models it doesn’t matter so much ‘how’ the model works, only that it does work. Another limitation in the ‘industrial machine learning’ case is that it involves collecting lots and lots of data. You need millions of active users on your service to justify building an advertising model for example.</p><p>These limitations make it difficult or impossible to make models that work with only a small amount of data and leverage domain-specific expertise. They also adversely affect models in dangerous or legally complicated contexts such as health or insurance. Here models that yield predictions must come with confidence that allow one to assess risk. For example, it’s important to know the uncertainty estimates when predicting likelihood of a patient having a disease, or understanding how exposed a portfolio is to a loss in say banking or insurance.</p><p>If we go beyond these limitations we open the door to new kinds of products and analyses, that is the subject of this article. The solution is a statistical technique called <strong>Bayesian inference</strong>. This technique begins with our stating prior beliefs about the system being modelled, allowing us to encode expert opinion and domain-specific knowledge into our system. These beliefs are combined with data to constrain the details of the model. Then, when used to make a prediction, the model doesn’t give one answer, but rather a distribution of likely answers, allowing us to assess risks.</p><p>Bayesian inference has long been a method of choice in academic science for just those reasons: it natively incorporates the idea of confidence, it performs well with sparse data, and the model and results are highly interpretable and easy to understand. It is simple to use what you know about the world along with a relatively small or messy data set to predict what the world might look like in the future.</p><p>Until recently the practical engineering challenges of implementing these systems were prohibitive, and required a large amount of specialized knowledge. Recently, a new programming paradigm, probabilistic programming, has emerged. <strong>Probabilistic programming</strong> hides the complexity of Bayesian inference, making these advanced techniques accessible to a broad audience of programmers and data analysts.</p><p>The fundamental ideas of probabilities and distributions of results are the basic building blocks of models in this paradigm.</p><p>One of the most exciting and impactful innovations in modern machine learning has been deep learning for image analysis, that’s enabled previously impossible performance. Probabilistic Programming was often too specialised or involved specialised languages, and while this isn’t a new capability, is likely to be as impactful as Deep Learning was.</p><p>Probabilistic Programming allows you to incorporate your domain knowledge with your observed data. It is powerful for three reasons: firstly for allowing you to incorporate domain knowledge — most machine learning frameworks don’t do that secondly it works well with small or noisy datasets and thirdly it is interpretable.</p><h3>What are the applications?</h3><p>Simply put, in any application area where you have lots of heterogeneous or noisy data or anywhere you need a clear understanding of your uncertainty are areas that you can use Bayesian Statistics. From discussions with experts some of the areas that have seen early adoption have been <a href="https://multithreaded.stitchfix.com/blog/2016/04/21/forget-arima/">e-commerce</a>, insurance, finance and healthcare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*sWUrUWGdA4Y8ikVv" /></figure><p>Source: <a href="https://www.psychologyinaction.org/psychology-in-action-1/2012/10/22/bayes-rule-and-bomb-threats">https://www.psychologyinaction.org/psychology-in-action-1/2012/10/22/bayes-rule-and-bomb-threats</a></p><p>The power of Bayes’ rule stems from the fact that it relates a quantity we can calculate (the likelihood that we would have observed the measured data if the hypothesis were true) to one we can use to answer arbitrary questions (the posterior probability that a hypothesis is true given the data).</p><h3>Hierarchical Models</h3><p>The <strong>Bayesian secret sauce </strong>is hierarchical models. We can use them to model complex systems with independencies. In such a model, we observe the behaviour of individual events, but we incorporate the belief that these events can be grouped together in a hierarchy.</p><p>This could be for example a Real Estate pricing model or for pricing risk in commercial insurance. In both models you have apartments or shops in neighbourhoods, and neighbourhoods are in boroughs. Not all shops in a neighbourhood are alike, but they are on average pretty similar. The average shop in Peckham is different to the average shop in Deptford and very different to the average shop in Putney.</p><p>This is the hierarchical model. We can learn a lot by modelling this way, we can learn about Deptford not only from Deptford but from Peckham and Putney. This can be very useful in cases where the data is sparse at a particular level of the hierarchy, i.e. they are no claims in a particular neighbourhood in a particular time period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*iqYhEhOEOjlzltxK" /></figure><p>Figure: Illustrating the hierarchy for an ‘income prediction’ model.</p><h3>Want to learn more?</h3><ul><li><a href="https://www.youtube.com/watch?v=0kRytJZcHVw">https://www.youtube.com/watch?v=0kRytJZcHVw</a> is a talk I did recently at PyData London</li><li>You may want to sign up to the Probabilistic Programming Primer mailing list here <a href="http://eepurl.com/dFZZGb">http://eepurl.com/dFZZGb</a></li><li>I have put together a course called <a href="http://www.probabilisticprogrammingprimer.com/">Probabilistic Programming Primer</a>, it provides hands on instruction of over 3 and a half hours of screencasts in going into the nitty-gritty of Probabilistic Programming.</li><li>To learn more data science stuff you can follow me on Twitter @<a href="http://www.twitter.com/springcoil">springcoil</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37b91c2c257c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/what-is-bayesian-statistics-used-for-37b91c2c257c">What is Bayesian Statistics used for?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why would I ever NEED Bayesian Statistics?]]></title>
            <link>https://peadarcoyle.medium.com/why-would-i-ever-need-bayesian-statistics-4cf844c4a23a?source=rss-3516b91ea59------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cf844c4a23a</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[bayesian]]></category>
            <dc:creator><![CDATA[Peadar Coyle]]></dc:creator>
            <pubDate>Wed, 31 Oct 2018 16:13:05 GMT</pubDate>
            <atom:updated>2018-10-31T16:49:00.963Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why would I ever need Bayesian Statistics?</h3><h3>Probabilistic Programming versus Machine Learning</h3><p>In the past ten years, we’ve seen an explosion in Machine Learning applications, these applications have been particularly successful in search, e-commerce, advertising, social media and other verticals. These applications have been particularly focused on predictive accuracy and often involve large amounts of data — sometimes in the region of terabytes — in fact this drove a lot of innovation at the Tech giants such as Netflix, Amazon, Facebook and Google.</p><p>Fundamentally though these models — often are ‘black boxes’ and are not easily understood by observers, in applications such as churn modelling or building targeted advertising models — it doesn’t matter so much ‘how’ the model works, only that it does work. Another limitation in the ‘industrial machine learning’ case is that it involves collecting lots and lots of data. You need millions of active users on your service to justify building an advertising model for example.</p><p>These limitations make it difficult or impossible to make models that work with only a small amount of data and leverage domain-specific expertise. They also adversely affect models in dangerous or legally complicated contexts such as health or insurance where models that yield predictions must come with confidence that allow one to assess risk. For example it’s important to know the uncertainty estimates when predicting likelihood of a patient having a disease, or understanding how exposed a portfolio is to a loss in say banking or insurance.</p><p>If we go beyond these limitations we open the door to new kinds of products and analyses, and is the subject of this article. The solution is a statistical technique called <strong>Bayesian inference</strong>. This technique begins with our stating prior beliefs about the system being modelled, allowing us to encode expert opinion and domain-specific knowledge into our system. These beliefs are combined with data to constrain the details of the model. Then, when used to make a prediction, the model doesn’t give one answer, but rather a distribution of likely answers, allowing us to assess risks.</p><p>Bayesian inference has long been a method of choice in academic science for just those reasons: it natively incorporates the idea of confidence, it performs well with sparse data, and the model and results are highly interpretable and easy to understand. It is simple to use what you know about the world along with a relatively small or messy data set to predict what the world might look like in the future.</p><p>Until recently the practical engineering challenges of implementing these systems were prohibitive, and required a large amount of specialized knowledge.Recently, a new programming paradigm has emerged. <strong>Probabilistic programming</strong> hides the complexity of <strong>Bayesian inference</strong>, making these advanced techniques accessible to programmers and data analysts.</p><p>The fundamental ideas of probabilities and distributions of results are the basic building blocks of this approach.</p><p>One of the most exciting, impactful innovations in modern machine learning has been deep learning for image analysis, that’s enabled previously impossible performance. Like Deep Learning, <strong>Probabilistic Programming </strong>previously involved specialised languages, and while isn’t a new capability, it is likely to be as impactful as Deep Learning was.</p><p>It allows you to incorporate your domain knowledge, with your observed data. It is powerful for three reasons firstly for allowing you to incorporate domain knowledge — most machine learning frameworks don’t do that, secondly it works well with small or noisy datasets and thirdly it is interpretable.</p><h3>What are the applications?</h3><p>Simply put any application area where you have lots of heterogenous or noisy data, you need to incorporate domain knowledge or anywhere you need a clear understanding of your uncertainty, are areas that you can use Bayesian Statistics. From discussions with experts some of the areas that have seen early adoption have been <a href="https://multithreaded.stitchfix.com/blog/2016/04/21/forget-arima/">e-commerce</a>, insurance, finance and healthcare. Personally I’ve built probabilistic programming models for risk modelling, insurance and for modelling marketing spend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*sWUrUWGdA4Y8ikVv" /></figure><p>Source: <a href="https://www.psychologyinaction.org/psychology-in-action-1/2012/10/22/bayes-rule-and-bomb-threats">https://www.psychologyinaction.org/psychology-in-action-1/2012/10/22/bayes-rule-and-bomb-threats</a></p><p>The power of Bayes’ rule stems from the fact that it relates a quantity we can calculate (the likelihood that we would have observed the measured data if the hypothesis were true) to one we can use to answer arbitrary questions (the posterior probability that a hypothesis is true given the data).</p><h3>Hierarchical Models</h3><p>The <strong>Bayesian secret sauce </strong>is hierarchical models. We can use them to model complex systems with independencies. In such a model, we observe the behaviour of individual events, but we incorporate the belief that these events can be grouped together in a hierarchy.</p><p>This could be for example a Real Estate pricing model or for pricing risk in commercial insurance. In both models you have apartments or shops in neighbourhoods, and neighbourhoods are in boroughs. Not all shops in a neighbourhood are alike, but they are on average pretty similar. The average shop in Peckham is different to the average shop in Deptford and very different to the average shop in Putney.</p><p>This is the hierarchical model. We can learn a lot by modelling this way, we can learn about Deptford not only from Deptford but from Peckham and Putney. This can be very useful in cases where at a particular level of the hierarchy — the data is sparse, i.e. there are no claims in a particular neighbourhood in a particular time period.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/0*iqYhEhOEOjlzltxK" /></figure><p>Figure: Illustrating the hierarchy for an ‘income prediction’ model.</p><h3>Want to learn more?</h3><p>In future blog posts I’ll do further deep dives on what Bayesian models mean for data scientists who have to deal with highly regulated environments and the power of being able to pick a prior. Until then here are some excellent resources:</p><ul><li><a href="https://www.youtube.com/watch?v=0kRytJZcHVw">https://www.youtube.com/watch?v=0kRytJZcHVw</a> is a talk I did recently at PyData London</li><li>You may want to sign up to the Probabilistic Programming Primer mailing list here <a href="http://eepurl.com/dFZZGb">http://eepurl.com/dFZZGb</a></li><li>I have put together a course called <a href="http://www.probabilisticprogrammingprimer.com/">Probabilistic Programming Primer</a>, it provides hands on instruction of over 3 and a half hours of screencasts in going into the nitty-gritty of Probabilistic Programming.</li><li>To learn more data science stuff you can follow me on Twitter @<a href="http://www.twitter.com/springcoil">springcoil</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cf844c4a23a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>